Skip to content

Instantly share code, notes, and snippets.

@GeriYatola
GeriYatola / brew-sync.sh
Last active December 20, 2021 08:57 — forked from jpawlowski/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
DROPBOX_FOLDER=~/dropbox/.configs/Homebrew
BREWFILE="${DROPBOX_FOLDER}/Brewfile"
BREWFILE_TMP="/tmp/Brewfile"
@GeriYatola
GeriYatola / varnishlog-examples.sh
Last active January 10, 2023 12:45 — forked from cupracer/varnishlog-examples.sh
varnishlog examples (version 4.x)
# filter by response status, print request
varnishlog -q 'RespStatus == 503' -g request
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)

Keybase proof

I hereby claim:

  • I am geriyatola on github.
  • I am ketola (https://keybase.io/ketola) on keybase.
  • I have a public key ASBOzpZa3R672hxw6Pa669anzIdSWtSAnoTLr40pRP5duAo

To claim this, I am signing this object:

@GeriYatola
GeriYatola / vpn_functions.sh
Last active August 29, 2015 14:23
Bring OS X VPN connections up/down from bash
#! /bin/bash
# Bash functions for connecting/disconnecting to a VPN provider under OS X.
# Define additional routes at the end of vpn-connect if needed.
#
# Source:
# http://superuser.com/questions/358513/start-configured-vpn-from-command-line-osx
export VPN_NAME='My VPN' # Name of your VPN connection profile
export VPN_INTERFACE='ppp0' # VPN interface (fixed)
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select