Skip to content

Instantly share code, notes, and snippets.

View jordan-brough's full-sized avatar

Jordan Brough jordan-brough

View GitHub Profile
diriver63 / pyodbc-unixODBC-lambda-layer
Last active April 28, 2024 19:35
pyodbc and unixODBC for MSSQL as a lambda layer
# use to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
curl -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt
jordan-brough / DefaultKeyBinding.dict
Last active April 9, 2024 16:29
MacOS checkmark keybinding
// Installation:
// 1. Save this file as /Users/YOUR_USER_NAME_HERE/Library/KeyBindings/DefaultKeyBinding.dict
// 2. Log out and log back in (or just restart any app where you'd like to use the shortcut)
// What: Keyboard shortcut to easily insert checkmarks. (Or whatever text you'd like to insert).
// By default option+v in MacOS inserts a square-root symbol: √
// I've often used option+v as a quick-and-dirty checkmark. This shortcut lets me get a real checkmark.
// Insert a checkmark with option+v
jordan-brough / google-url-shortener-bookmarklet.js
Created November 22, 2017 16:48 URL shortener bookmarklet
// Step 1: Get an API key here:
// Step 2: Paste your api key below
// Step 3: Add the code below to your browser as a bookmark
// Step 4: Visit a URL and click your bookmark
// NOTE: The security policy of some sites (such as this!) will prevent this from working.
// Check your javascript console if something doesn't work.
var googleApiKey = 'INSERT YOUR API KEY HERE';
cdesch /
Last active May 15, 2024 13:40
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info


You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

gboudreau /
Last active June 12, 2024 13:18 — forked from Ingramz/
Export TOTP tokens from Authy
psanford /
Last active May 16, 2024 10:28
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

JuggoPop / Git branch bash autocomplete *with aliases*
Created April 15, 2014 06:23
Git branch bash autocomplete *with aliases* (add to .bash_profile)
# To Setup:
# 1) Save the .git-completion.bash file found here:
# 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect:
# Git branch bash completion
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
# Add git completion to aliases
damncabbage / random.rb
Created August 23, 2013 01:37
Generate a random string of 0-9, a-z characters in Ruby.
require 'securerandom'
length = 10
SecureRandom.random_number(36 ** length).to_s(36) # Base 36, ie. 0..9 + a..z
# => "9datwwkqlo"
atenni /
Last active April 24, 2024 01:36
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.


To return the first file from a gist:[gist_user]/[gist_id]/raw/

To get a file from multi–file gist:[gist_user]/[gist_id]/raw/[file_name]

AndrewRadev / ack-gems
Created December 20, 2012 14:15
Use 'ack' to search through all the gems in the project. Call with "bundle exec ack-gems".
#! /usr/bin/env ruby
require 'bundler'
paths =
system("ack '#{ARGV[0]}' #{paths.join(' ')}")