Skip to content

Instantly share code, notes, and snippets.

View brysgo's full-sized avatar

Bryan Goldstein brysgo

View GitHub Profile
@brysgo
brysgo / index.html
Last active July 9, 2018 21:09 — forked from darwin/index.html
Dev escalated quickly
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Dev escalated quickly</tspan>
</label>
<drawing t="translate(130,130)">
@brysgo
brysgo / gist:0183a8dded41b1356107
Last active December 27, 2015 23:08 — forked from zmalltalker/gist:5900206
Install ruby-install, chruby and ruby 2.2.0 on Centos - Install puppet - Run `puppet apply <(curl -S https://gist.githubusercontent.com/brysgo/0183a8dded41b1356107/raw/103f4a87ecd143285da444c4e5c24b70680256cb/gistfile1.pp)`
# chruby
# ruby-install
# ruby 2.2.0
# /etc/profile.d/chruby.sh
Exec {
path => ["/bin","/usr/bin", "/usr/local/bin"]
}
file { "/etc/profile.d/chruby.sh":
ensure => present,
@brysgo
brysgo / post_checkout_migrations.sh
Last active October 5, 2019 11:13 — forked from skyriverbend/rails_switch_branch.py
Post checkout hook for managing rails migrations and bundle install
CHECKING_OUT_BRANCH=$3
OLD_BRANCH=$1
NEW_BRANCH=$2
if [ $CHECKING_OUT_BRANCH -eq 1 ]
then
FILES_CHANGED=`git diff $OLD_BRANCH $NEW_BRANCH --name-status`
MIGRATIONS_REMOVED=`echo "$FILES_CHANGED" | egrep 'D\tdb/migrate/([0-9]+)' | sort -r`
MIGRATIONS_ADDED=`echo "$FILES_CHANGED" | egrep 'A\tdb/migrate/([0-9]+)'`
@brysgo
brysgo / ng_use_default.js.coffee
Last active August 29, 2015 13:57 — forked from nl5887/ng_initial.js
Directive to use the value of the DOM element as the default for an ngModel instead of having to bootstrap from the controller.
@app.directive 'ngUseDefault', ->
restrict: 'A'
controller: ['$scope', '$element', '$attrs', '$parse', ($scope, $element, $attrs, $parse) ->
initialValue = $element.val()
getter = $parse($attrs.ngModel)
setter = getter.assign
setter($scope, initialValue)
]