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 / example-plugin.php
Last active November 29, 2016 00:50
An example plugin.php
<?php
/*
Plugin Name: Example Plugin
Plugin URI: http://domain.com
Description: Describe plugin
Version: 1.0
*/
/*
* Find, search, and replace "artist" to rename the object. Double check that you didn't miss "artists"
*/
@igolden
igolden / react-native-ultisnip.snippet
Created December 6, 2016 01:05
React Native snippets for vim and ultisnip
snippet rnccf
import React, { PropTypes } from 'react'
import { View, StyleSheet, Text } from 'react-native'
$1.propTypes = {
}
export default function ${1:FunctionName} (props) {
return (
@igolden
igolden / dtran.zsh-theme
Last active January 26, 2017 04:04
zshell theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
@igolden
igolden / .bashrc
Last active February 8, 2017 21:14
Provisioning files for new eC2 instance
[ -z "$PS1" ] && return
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
shopt -s checkwinsize
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
@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
@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
defaults -currentHost read -g | grep -oP 'keyboard.modifiermapping.\K([0-9-]*)'
#!/bin/ruby
cmds = [
# "SPInstallHistoryDataType",
"SPBluetoothDataType",
# SPNetworkLocationDataType,
# SPDiagnosticsDataType,
# SPUSBDataType,
# SPSoftwareDataType,
#SPCameraDataType,
@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)
@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.