Skip to content

Instantly share code, notes, and snippets.

View arnissolle's full-sized avatar
🐌

Pierre Arnissolle arnissolle

🐌
View GitHub Profile
@arnissolle
arnissolle / cloudflare-ddns-update.sh
Last active September 22, 2021 17:35 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/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
@arnissolle
arnissolle / github_multiple-accounts.md
Created May 13, 2020 10:06 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts

Step 1 - Create a New SSH Key

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.

Step 2 - Attach the New Key

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@arnissolle
arnissolle / Envoy.blade.php
Last active June 8, 2020 21:11 — forked from gvsrepins/Envoy.blade.php
A Laravel envoy script for deployment
@servers(['production' => 'productionserver', 'local'=> '127.0.0.1'])
{{-- Configuration section --}}
@setup
/*
|--------------------------------------------------------------------------
| Git Config
|--------------------------------------------------------------------------
|
@arnissolle
arnissolle / certbot
Created September 3, 2018 09:04 — forked from wintermeyer/certbot
certbot -q renew --deploy-hook "service nginx reload"
# /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
# ----------------------
@arnissolle
arnissolle / slugify.js
Last active May 20, 2017 09:19 — forked from mathewbyrne/slugify.js
JavaScript Slugify
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+|-+$/g, ''); // Trim -
}