I hereby claim:
- I am arnissolle on github.
- I am arnissolle (https://keybase.io/arnissolle) on keybase.
- I have a public key ASDglSeqvcjfLUK4gnT12bzAMp-X-Di_4S1hv255JBqkuQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| trait Singleton | |
| { | |
| private static $instance; | |
| public static function getInstance(...$args): static | |
| { | |
| if (null === self::$instance) { | |
| self::$instance = new static(...$args); |
| #!/usr/bin/env sh | |
| # A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
| # Used to provide DDNS service for my home | |
| # Needs the DNS record pre-creating on Cloudflare | |
| # Proxy - uncomment and provide details if using a proxy | |
| #export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
| # Cloudflare zone is the zone which holds the record |
We need to generate a unique SSH key for our second GitHub account.
ssh-keygen -t rsa -C "your-email-address"
Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.
| <?php | |
| class CSRF | |
| { | |
| public static $salt = null; | |
| public static function getToken($force_renew_token = false) | |
| { | |
| if ($force_renew_token || !self::hasValidToken()) | |
| { |
| -- The finest solution for calculating Age from Date of Birth | |
| SELECT TIMESTAMPDIFF(YEAR, birthdate, CURDATE()) AS age FROM users; |
| @servers(['production' => 'productionserver', 'local'=> '127.0.0.1']) | |
| {{-- Configuration section --}} | |
| @setup | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Git Config | |
| |-------------------------------------------------------------------------- | |
| | |
| # /etc/cron.d/certbot: crontab entries for the certbot package | |
| # | |
| # Upstream recommends attempting renewal twice a day | |
| # | |
| # Eventually, this will be an opportunity to validate certificates | |
| # haven't been revoked, etc. Renewal will only occur if expiration | |
| # is within 30 days. | |
| SHELL=/bin/sh | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |
| #!/usr/bin/env bash | |
| # ---------------------- | |
| # installing dnsmasq and enable daemon | |
| # ---------------------- | |
| brew install dnsmasq | |
| sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
| # ---------------------- | |
| # adding resolver for test domain | |
| # ---------------------- |