Skip to content

Instantly share code, notes, and snippets.

@yannispanousis
yannispanousis / README.md
Last active October 14, 2019 19:30
L2TP Client Setup (Ubuntu 15.10)

L2TP Client Setup for Ubuntu

You'll need:

  • VPN server IP
  • VPN pre-shared key
  • VPN username
  • VPN password

The following instructions are mostly derived from the corresponding ones for ArchLinux in this wiki.

@yannispanousis
yannispanousis / remote-deploy-from-local.md
Last active January 25, 2017 11:32
Remote deploy workflow from local

Control a remote deploy from local

(One-off) Setup your remote docker certs

AWS_ACCESS_KEY_ID=AKIAIFNBUFP72FDTYCIQ AWS_SECRET_ACCESS_KEY=pqM8Oz6v8Bmxpg3swj8qjG37ejlXmUI/lPHsNPqp aws --region=us-east-1 s3 cp s3://circleci-build-assets/docker-machine-remote.tar .
tar -xvf docker-machine-remote.tar
mkdir -p ~/.docker/machine ~/.docker/machine/machines
cp -rf ./remote ~/.docker/machine/machines/
cp -rf ./remote-certs ~/.docker/machine/
@yannispanousis
yannispanousis / mocha-currenttest-object.txt
Created November 18, 2015 11:36
JavaScript Mocha 'this.currentTest' object inside hooks
{
"title": "Should allow me to log out",
"async": 0,
"sync": true,
"timedOut": false,
"pending": false,
"type": "test",
"file": "/home/yannis/git/lystable-frontend/e2e-test/team/auth-test.js",
"parent": "#<Suite>",
"ctx": "#<Context>",
@yannispanousis
yannispanousis / webdriverio-browser-object.txt
Last active November 18, 2015 11:30
The 'browser' object made available globally *per browser tested* within https://github.com/webdriverio/webdriverio tests
{
"defer": {
"promise": {
"source": {}
}
},
"promise": {
"source": {}
},
"lastPromise": {},
@yannispanousis
yannispanousis / sync-time.sh
Created September 4, 2015 12:32
Sync NTP Time Background Process
#!/bin/bash
#
# Run me like this: "sudo bash sync-time.sh"
#
PID=/var/run/sync-time.pid
GREP=$(ps aux | grep $PID)
GREP_RC=$?
if [[ -f $PID && $GREP_RC == 0 ]]; then
echo "Process already running"
exit 0
@yannispanousis
yannispanousis / mandrill_verify.py
Last active September 2, 2015 14:47
Mandrill Signature Verification in Python3
import base64
import hashlib
import hmac
def calculate_mandrill_signature(key, url, data):
"""Calculate the Mandrill signature of a POST request.
Args:
key: the Mandrill key for your webhook
url: the POST URL configured in Mandrill, e.g. https://your-webhook-handling-api.your-domain.com/path/to/endpoint
data: dictionary containing the POST data