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
#!/bin/bash | |
# prereqs | |
sudo apt-get install unzip | |
# Chrome Repo | |
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7 | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb |
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 'json' | |
results = `adb shell content query #{ARGV.join(' ')}` | |
lines = results.split("\n") | |
rows = lines.map do |line| | |
match = line.match(/Row: \d+ (.*)/) | |
next unless match |
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
export function initialize(/* appInstance */) { | |
// appInstance.inject('route', 'foo', 'service:foo'); | |
} | |
export default { | |
initialize | |
}; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle gist' | |
}); |
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
Benchmark.ips do |x| | |
strings = ['android', '1002,60009,30012,60004,20023,10005,10011,50003,10012,50004,10005,30013,60007,10006', '4068B063-0CDF-4579-B4E9-15298ECF9929', 'android', '1002,60009,30012,60004,20023,10005,10011,50003,10012,50004,10005,30013,60007,10006', '4068B063-0CDF-4579-B4E9-15298ECF9929', 'android', '1002,60009,30012,60004,20023,10005,10011,50003,10012,50004,10005,30013,60007,10006', '4068B063-0CDF-4579-B4E9-15298ECF9929'] | |
times = ['2016-08-01 13:00:01+0000', '2016-08-01T13:00:01+0000', '2015-09-27T16:36:45.966+0000'] | |
10.times do | |
times += strings | |
end | |
pt = times.map { |t| Time.parse(t) rescue nil } | |
x.report("match then build w/ iso") do | |
times.each_with_index do |time, 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
require 'csv' | |
coach_years=CSV.read('coaches.csv')[1..-1] | |
def parse_coach_year(coach_year) | |
start_year, end_year_suffix = coach_year[0].split('-') | |
end_year_prefix = start_year < '2000' ? '19' : '20' | |
end_year = "#{end_year_prefix}#{end_year_suffix}" | |
return coach_year[1], start_year.to_i, end_year.to_i | |
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
Installing ruby_core_source (0.1.5) | |
Installing linecache19 (0.5.11) with native extensions | |
[33mGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/usr/local/bin/ruby extconf.rb | |
checking for vm_core.h... no | |
checking for vm_core.h... no | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more |
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
#!/bin/bash | |
# Check if any submodule has been updated in HEAD after a merge (or | |
# pull) or a branch checkout. If so, ask if user wants to run | |
# git-submodule update. | |
# --Chaitanya Gupta | |
SCRIPT_NAME=$(basename "$0") | |
if [[ "$SCRIPT_NAME" = "post-checkout" && "$1" = "$2" || "$3" = "0" ]]; then |
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
alias oops="rfind breakpoint; rfind debugger" | |
function rfindhelper () { | |
find $1 -name '*.rb' -o -name '*.rhtml' -o -name '*.erb' -o -name '*.rjs' -o -name '*.builder' -o -name '*.js' | xargs grep -i "$2" | |
} | |
function rfind () { | |
rfindhelper "app config test lib" "$*" | |
} | |
function rfindrails () { | |
rfindhelper "vendor/rails" "$*" |
NewerOlder