This file contains 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
# Make gems available | |
require 'rubygems' if RUBY_VERSION <= '1.9.0' | |
# http://drnicutilities.rubyforge.org/map_by_method/ | |
require 'map_by_method' | |
# Dr Nic's gem inspired by | |
# http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html | |
require 'what_methods' |
This file contains 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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
# set-option -g status-style bg=black,fg=cyan# bg=base02, fg=yellow | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-jontinuum' | |
set -g @plugin 'tmux-plugins/tmux-open' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' |
This file contains 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 | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
This file contains 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 | |
sudo su | |
apt-get --purge remove linux-sound-base alsa-base alsa-utils | |
apt-get install linux-sound-base alsa-base alsa-utils | |
apt-get install gdm ubuntu-desktop | |
reboot |
This file contains 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
123 |
This file contains 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 HelloWorld: | |
def __init__(self, name): | |
self.name = name.capitalize() | |
def sayHi(self): | |
print "Hello " + self.name + "!" | |
hello = HelloWorld("world") | |
hello.sayHi() |
This file contains 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
content XYZ |
This file contains 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
content XYZ |
This file contains 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 ImportDateStatsFromSparkExportBackfill < ImportDateStatsFromSparkExport | |
FROM_DATE = Date.new(2016, 6, 1) | |
TO_DATE = Date.new(2017, 1, 18) | |
private | |
def process_location(location) | |
(FROM_DATE..TO_DATE).each do |date| | |
$backfill_date = date | |
Rails.logger.info "===> Importing for #{$backfill_date}" |
This file contains 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' | |
infile = ARGV[0] | |
slice = ARGV[1] || 100 | |
origin = CSV.open infile | |
all_lines = origin.readlines | |
header = all_lines.first | |
all_lines.delete_at(0) |
NewerOlder