Skip to content

Instantly share code, notes, and snippets.

@julienma
julienma / README.md
Last active August 15, 2023 10:40
GitHub Actions: using SSH keys to auto-deploy with dokku-push

The dokku-push action requires an SSH key with push access to the Dokku instance. Here's how to do that.

Replace APPNAME with the name of the app (e.g. this is a good idea to use the same name used on Dokku's).

Generate a new SSH keypair

We want each repo to have its own SSH key, so it's easier to rotate/invalidate them if required, without affecting all the repos. Let's generate a new key on your computer (see GitHub help):

@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active April 16, 2024 12:18
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@bob-lee
bob-lee / polyfill-ie11-nodelist-foreach.js
Created November 24, 2017 18:41
Polyfill for IE11 missing NodeList.forEach
if ('NodeList' in window && !NodeList.prototype.forEach) {
console.info('polyfill for IE11');
NodeList.prototype.forEach = function (callback, thisArg) {
thisArg = thisArg || window;
for (var i = 0; i < this.length; i++) {
callback.call(thisArg, this[i], i, this);
}
};
}
@gagarine
gagarine / install-clamav-osx.md
Last active June 7, 2023 07:54
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@varyonic
varyonic / docker-compose.yml
Last active May 18, 2021 13:18
Capybara standalone Selenium Chrome config
web:
build: .
volumes:
- .:/opt/myapp
ports:
- '3000:3000'
links:
- db
- redis
- selenium
@rlcarrca
rlcarrca / get_metadata.sh
Last active May 6, 2023 03:57
RETS server connectivity via curl
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o data/metadata.xml \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@tonyfast
tonyfast / bokeh_and_pyyaml.ipynb
Last active August 29, 2015 14:27
Building Interactions between the IPython notebook and Bokeh Plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brianboyer
brianboyer / gist:c9d412a26cb57b5ebbc7
Created November 6, 2014 14:57
Convert a mailbox file into CSV
# assumes your file is called mbox (which it is if you export from Mac Mail)
# writes to a file called mbox.csv
import mailbox
import csv
# motherfucking recursion, because email is damn weird.
# each payload can contain many other payloads, which can contain many *other* payloads
# this only exports the text/plain payload, the thing you read
def more_payloads(message):
@richard-flosi
richard-flosi / assertions-compareScreenshot.js
Created August 27, 2014 14:25
Nightwatch with Visual Regression testing
// assertions/compareScreenshot.js
var resemble = require('resemble'),
fs = require('fs');
exports.assertion = function(filename, expected) {
var screenshotPath = 'test/screenshots/',
baselinePath = screenshotPath + 'baseline/' + filename,
resultPath = screenshotPath + 'results/' + filename,
diffPath = screenshotPath + 'diffs/' + filename;