Skip to content

Instantly share code, notes, and snippets.

View kriswill's full-sized avatar

Kris Williams kriswill

View GitHub Profile
@kriswill
kriswill / npm-install.txt
Created September 14, 2015 17:56
sails-docker-boilerplate npm install
kris git[master] ~/src/oss/sails-docker-boilerplate
→ docker-compose run sails npm install
Building sails...
Step 0 : FROM node:4.0.0
4.0.0: Pulling from library/node
8b49fe88b40b: Pull complete
20b348f4d568: Pull complete
16b189cc8ce6: Pull complete
116f2940b0c5: Pull complete
1c4c600b16f4: Pull complete
@kriswill
kriswill / pb.sublime-project
Created September 12, 2011 19:38
pb sublime-text 2 general project file
{
"folders":
[
{
"path": "./common",
"folder_exclude_patterns": ["3rdparty"]
},
{
"path": "./includes",
"folder_exclude_patterns": ["3rdparty"]
@kriswill
kriswill / chosen-ie7-prototype-js.diff
Created May 10, 2012 18:11
Chosen IE7 Prototype.js git-diff
diff --git a/chosen/chosen.proto.js b/chosen/chosen.proto.js
index e5049b0..0200299 100644
--- a/chosen/chosen.proto.js
+++ b/chosen/chosen.proto.js
@@ -408,14 +408,15 @@ Copyright (c) 2011 by Harvest
Chosen.prototype.container_mousedown = function(evt) {
var target_closelink;
if (!this.is_disabled) {
- target_closelink = evt != null ? evt.target.hasClassName("search-choice-close") : false;
+ var target = evt != null && evt.target ? $(evt.target) : null
@kriswill
kriswill / Smarty.tmLanguage
Created May 11, 2012 20:42
Smarty textmate syntax file, modified to work with SublimeText 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>tpl</string>
<string>html</string>
</array>
<key>foldingStartMarker</key>
@kriswill
kriswill / kris.tmTheme
Created July 17, 2012 01:52
Kris' Railscast theme - modified for SublimeText2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Kris - based on Railscasts</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
Verifying that +krisw is my blockchain ID. https://onename.com/krisw
@kriswill
kriswill / controllers.application.js
Created August 25, 2016 16:40
Testing saving Twiddle to Gist
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@kriswill
kriswill / terminfo.sh
Last active September 10, 2016 06:57
Prints information about the terminal application you are using
# prints information about the terminal application you are using
function terminfo() {
# make OPTIND local to prevent odd behaviour with getops when running a function multiple times
local OPTIND v
local _verbose=0
while getopts "v" OPTION
do
case $OPTION in
@kriswill
kriswill / link-gliffy-modules.sh
Last active October 12, 2016 18:40
Re-link all @gliffy/ember-* modules with NPM
@kriswill
kriswill / apk-info-json.sh
Created October 9, 2017 19:24
Parse alpine apk package versions into a JSON blob
node -p "require('child_process').exec('apk info --verbose', (err, out) => { packages = {}; out.split('\n').filter(line => line.length).forEach(line => { const parts = line.split('-'); packages[parts[0]] = line.replace(parts[0]+'-', ''); }); console.log(JSON.stringify(packages, null, 2)); process.exit(0)}); '';"