This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Config. | |
| */ | |
| #define CYCLE_INTERVAL 28800000UL // 8h (28800000UL) for production; for testing use: 60 for 60s | |
| #define HUMIDITY_THRESHOLD 300 // dry > HUMIDITY_THRESHOLD > wet (dry ~= 1020, wet ~= 0-340) | |
| #define MAX_WATERING_TIME 30000UL // 30s max per watering cycle | |
| #define SENSOR_CHECK_INTERVAL 500UL // re-read sensors every 500ms while watering | |
| /** | |
| * LED blink ramp: slow at start, fast near timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( | |
| 'netopia_payment_request_params', | |
| function ( \Netopia_Payment_Request_Abstract $mobilpay_instance, int $order_id ) { | |
| require_once get_stylesheet_directory() . '/inc/classes/class-netopia-payment-split.php'; | |
| $netopia_instance->split = new Inc\Classes\Netopia_Payment_Split(); | |
| $order = wc_get_order( $order_id ); | |
| $amount = 123; // Amount based on some products from the $order. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "basics": { | |
| "name": "Vlad Ilie", | |
| "label": "Full-Stack Developer · WordPress / WooCommerce & Next.js", | |
| "image": "https://github.com/vladutilie.png", | |
| "email": "hello@vladilie.ro", | |
| "phone": "", | |
| "url": "https://vladilie.ro", | |
| "summary": "Full-stack developer with 9+ years of experience building and running production websites and web applications. I specialise in WordPress and WooCommerce (custom plugins, themes, HPOS-ready store logic, performance and security) and in modern TypeScript apps built with Next.js, Prisma and Supabase. I own projects end to end — from data modelling and integrations (payments, Google APIs, transactional email) to deployment, CI/CD, monitoring and long-term maintenance. Romanian General Translation Editor on WordPress.org and an active open-source contributor.", | |
| "location": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Sync Products | |
| */ | |
| /** | |
| * Sync Products class. | |
| */ | |
| class Sync_Products { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HttpService, Injectable } from '@nestjs/common'; | |
| import { PaymentRepository } from './payment.repository'; | |
| import { map } from 'rxjs/operators'; | |
| import fs from 'fs'; | |
| import crypto from 'crypto'; | |
| import https from 'https'; | |
| import { User } from '../user/user.entity'; | |
| import { LessThan, MoreThan } from 'typeorm'; | |
| import { INGTokenDTO } from './payment.dto'; | |
| import { PaymentCredentials } from './payment-credentials.entity'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HttpService, Injectable } from '@nestjs/common'; | |
| import { map } from 'rxjs/operators'; | |
| import { User } from '../user/user.entity'; | |
| import { BTTokenDTO, ExchangingDataDTO, MakePaymentDTO, PaymentInfoDTO, RegisterBTClientDTO } from './payment.dto'; | |
| import { v4 as uuidv4 } from 'uuid'; | |
| import sha256 from 'crypto-js/sha256'; | |
| import Base64 from 'crypto-js/enc-base64'; | |
| import qs from 'querystring'; | |
| import { PaymentRepository } from './payment.repository'; | |
| import { PaymentCredentials } from './payment-credentials.entity'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| read -p 'WWW directory path [/Users/vlad/www/]: ' READ_WWW_PATH | |
| read -p 'Sitename (without no extension): ' SITENAME | |
| read -p 'Site locale [ro_RO]: ' READ_SITE_LOCALE | |
| WWW_PATH=${READ_WWW_PATH:='/Users/vlad/www'} | |
| SITE_LOCALE=${READ_SITE_LOCALE:=ro_RO} | |
| cd $WWW_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'gettext', 'remove_romanian_diacritics' ); | |
| function remove_romanian_diacritics( $translation ) { | |
| $diacritics = [ 'ă', 'â', 'î', 'ș', 'ț', 'Ă', 'Â', 'Î', 'Ș', 'Ț' ]; | |
| $replace_with = ['a', 'a', 'i', 's', 't', 'A', 'A', 'I', 'S', 'T' ]; | |
| $translation = str_replace( $diacritics, $replace_with, $translation ); | |
| return $translation; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('the_password_form', 'change_password_form_text' ); | |
| function change_password_form_text( $post = 0 ) { | |
| $post = get_post( $post ); | |
| $label = 'pwbox-' . ( empty( $post->ID ) ? rand() : $post->ID ); | |
| $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post"> | |
| <p>' . __( 'Here is your text:', 'textdomain' ) . '</p> | |
| <p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr_x( 'Enter', 'post password form' ) . '" /></p></form>'; | |
| return $output; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| read -p 'Domain name (no extension): ' DOMAIN_NAME | |
| read -p 'Domain extension [test]: ' DOMAIN_EXT | |
| read -p 'WWW directory path [/Users/vlad/www/]: ' READ_WWW_PATH | |
| read -p 'SSL directory path [/Users/vlad/ssl/]: ' READ_SSL_PATH | |
| WWW_PATH=${READ_WWW_PATH:='/Users/vlad/www'} | |
| EXTENSION=${DOMAIN_EXT:=test} | |
| SSL_PATH=${READ_SSL_PATH:='/Users/vlad/ssl'} |
NewerOlder