Skip to content

Instantly share code, notes, and snippets.

View igolden's full-sized avatar
🎯
Focusing

Ian Golden igolden

🎯
Focusing
View GitHub Profile
@igolden
igolden / install_shellinabox.sh
Last active September 7, 2017 22:34
Install shell in a box on ubuntu
#!/bin/bash
apt-get update && apt-get upgrade -y
apt-get install -y vim git ruby ruby-dev nodejs build-essential \
git libssl-dev libpam0g-dev zlib1g-dev \
dh-autoreconf
git clone https://github.com/shellinabox/shellinabox.git
cd shellinabox
autoreconf -i
@igolden
igolden / addnewuser.sh
Last active September 7, 2017 21:57
Adds a new user
#!/bin/bash
set -e
echo "This tool will create a new sudo user."
echo "================================================"
echo ""
echo "Choose username:"
read NEWUSER
echo "Choose password:"
@igolden
igolden / gist:26f90fa18a7f613ab7c97ea82f5ec41e
Created September 3, 2017 07:22
Vim theming help for reference
ColorColumn used for the columns set with 'colorcolumn'
*hl-Conceal*
Conceal placeholder characters substituted for concealed
text (see 'conceallevel')
*hl-Cursor*
Cursor the character under the cursor
*hl-CursorIM*
CursorIM like Cursor, but used when in IME mode |CursorIM|
*hl-CursorColumn*
CursorColumn the screen column that the cursor is in when 'cursorcolumn' is
@igolden
igolden / gist:59080958199ffd8909fb77e5fd46ba89
Created September 3, 2017 07:22
Vim theming help for reference
ColorColumn used for the columns set with 'colorcolumn'
*hl-Conceal*
Conceal placeholder characters substituted for concealed
text (see 'conceallevel')
*hl-Cursor*
Cursor the character under the cursor
*hl-CursorIM*
CursorIM like Cursor, but used when in IME mode |CursorIM|
*hl-CursorColumn*
CursorColumn the screen column that the cursor is in when 'cursorcolumn' is
@igolden
igolden / .rubocop.yml
Created September 2, 2017 08:15
Default rubocop config for easy dl
# This is the default configuration file. Enabling and disabling is configured
# in separate files. This file adds all other parameters apart from Enabled.
inherit_from:
- enabled.yml
- disabled.yml
# Common configuration.
AllCops:
# Include common Ruby source files.
@igolden
igolden / iterm_bg.sh
Created August 31, 2017 00:32
Set the iTerm background programatically
# Changes the background color of
# iTerm window using applescript
#
# @param colorMatrix {Object} -- {100,0,0}
#
# @usage adjustBackground "{100,0,0}"
adjustBackground() {
osascript -e "tell application \"iTerm\"
set current_terminal to (current terminal)
#!/bin/ruby
cmds = [
# "SPInstallHistoryDataType",
"SPBluetoothDataType",
# SPNetworkLocationDataType,
# SPDiagnosticsDataType,
# SPUSBDataType,
# SPSoftwareDataType,
#SPCameraDataType,
defaults -currentHost read -g | grep -oP 'keyboard.modifiermapping.\K([0-9-]*)'
@igolden
igolden / casperjs_output.txt
Created February 16, 2017 15:47
casperjs output, lots of good command references
Test file: /Users/igolden/apps/SeekerLocal/node_modules/casperjs/tests/suites/casper/agent.js
# userAgent() tests
PASS Default user agent matches /CasperJS/
PASS userAgent() tests (3 tests)
PASS Subject is strictly true
PASS Default user agent matches /plop/
Test file: /Users/igolden/apps/SeekerLocal/node_modules/casperjs/tests/suites/casper/alert.js
# alert events
PASS alert events (1 test)
PASS alert event has been intercepted
@igolden
igolden / provision.ec2.sh
Last active February 8, 2017 21:09
Script to quickly provision the ec2 instance for dev env
sudo su
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install git -y && sudo apt-get install wget -y
sudo apt-get install make -y
sudo apt-get install postgresql postgresql-contrib libpq-dev -y
sudo apt-get install nodejs -y
sudo apt-get install nginx
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz