Skip to content

Instantly share code, notes, and snippets.

View gist:1b1633a7c6225074e5911bde1edba4e7

Chrome debug

General

Request URL:https://example.com/user/two_factor
Request Method:POST
Status Code:500
Remote Address:10.129.250.100:8080
Referrer Policy:no-referrer
View gist:62fd48c9c68523f9bd325b3e48d225e9
START_LINE=$(($(grep -n "Table structure for table \`wp_options\`" dump_tmp.sql | cut -d':' -f 1) -1))
END_LINE=$(($(grep -n "ALTER TABLE \`wp_options\` ENABLE KEYS" dump_tmp.sql | cut -d':' -f 1) +1))
sed "${START_LINE},${END_LINE}d" dump_tmp.sql > dump_tmp-no_options.sql
mv dump_tmp-no_options.sql dump_tmp.sql
@eripa
eripa / gist:a37a792935fa286b0e41
Created Mar 25, 2016
docker wait for other service
View gist:a37a792935fa286b0e41
echo "Stalling for MySQL.. (${MYSQL_PORT_3306_TCP_ADDR}:${MYSQL_PORT_3306_TCP_PORT})"
while true; do
nc -q 1 "$MYSQL_PORT_3306_TCP_ADDR" "$MYSQL_PORT_3306_TCP_PORT" 2>/dev/null && break
done
View gist:0a8a4892a2a2a6f6f508
#!/bin/bash
set -euo pipefail
lockfile="/tmp/myscript.lock"
if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null;
then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
## COMMAND TO RUN GOES HERE
View gist:b2608eb87fa5e11e91c5
Verifying that +ericripa is my openname (Bitcoin username). https://onename.com/ericripa
@eripa
eripa / README.md
Last active Aug 29, 2015
Kibana Dashboard for standard Collectd config
View README.md
@eripa
eripa / keybase.md
Created Sep 30, 2014
Keybase.io proof
View keybase.md

Keybase proof

I hereby claim:

  • I am eripa on github.
  • I am ericripa (https://keybase.io/ericripa) on keybase.
  • I have a public key whose fingerprint is 655F 85E3 F560 43AA 7D2E F492 4B62 8008 4CDA E555

To claim this, I am signing this object:

@eripa
eripa / bootstraph.sh
Last active Aug 29, 2015
OS X bootstrap script for devtools, homebrew and ansible. From http://il.luminat.us/blog/2014/04/19/how-i-fully-automated-os-x-with-ansible/
View bootstraph.sh
#!/bin/bash
set -e
SRC_DIRECTORY="$HOME/src"
ANSIBLE_DIRECTORY="$SRC_DIRECTORY/ansible"
ANSIBLE_CONFIGURATION_DIRECTORY="$HOME/.ansible.d"
# Download and install Command Line Tools
if [[ ! -x /usr/bin/gcc ]]; then
@eripa
eripa / makeImage.sh
Created Apr 25, 2014
Script for creating a TimeMachine base image for copying to non-supported network drives
View makeImage.sh
#!/bin/bash
# A bash script to create a time machine disk image suitable for
# backups with OS X 10.6 (Snow Leopard)
# This script probably only works for me, so try it at your own peril!
# Use, distribute, and modify as you see fit but leave this header intact.
# (R) sunkid - September 5, 2009
usage ()
{
echo ${errmsg}"\n"
@eripa
eripa / bridge.sh
Created Apr 25, 2014
OS X network bridge
View bridge.sh
#! /bin/sh
# ######################################
# coded by Nat!
# 2013 Mulle kybernetiK
# GPL
command=${1:-start}
shift
proxyarp=${1:-no}
shift