This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2008 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def xor(other) | |
self + other - (self & other) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do shell script "xcode-select --install" | |
do shell script "sleep 1" | |
tell application "System Events" | |
tell process "Install Command Line Developer Tools" | |
keystroke return | |
click button "Agree" of window "License Agreement" | |
end tell | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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) | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]+)'` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pivotal-tracker' | |
TRACKER_TOKEN = ENV.fetch("TRACKER_TOKEN") | |
TRACKER_PROJECT_ID = ENV.fetch("TRACKER_PROJECT_ID") | |
PivotalTracker::Client.token = TRACKER_TOKEN | |
PivotalTracker::Client.use_ssl = true | |
project = PivotalTracker::Project.find(TRACKER_PROJECT_ID) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
def insert_comments(file) | |
result = "" | |
i = 0 | |
file.each_line do |line| | |
leading_indentation = line[/^\s*/] | |
comment_split = line.split("#").reverse | |
if comment_split.length == 2 | |
result += "\n#{leading_indentation}__comment_#{i}: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BehaviorDSL | |
def behavior(name, &block) | |
metadata[:description_args].push(name) | |
refresh_description | |
yield | |
metadata[:description_args].pop | |
refresh_description | |
end | |
private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, |
OlderNewer