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
""" | |
ci.py | |
A wrapper for Chocolatey's cinst, to allow searching. | |
Usage: ci (search/package name) | |
""" | |
import os | |
import sys |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\Open Folder with &Sublime Text 3] | |
@="Open Folder with &Sublime Text 3" | |
[HKEY_CLASSES_ROOT\Directory\shell\Open Folder with &Sublime Text 3\command] | |
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\"" |
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
###### IO Boilerplate ###### | |
import sys | |
if len(sys.argv) < 2: | |
input_file_name = "23-queryboard-in.txt" | |
else: | |
input_file_name = sys.argv[1] | |
with open(input_file_name) as input_file: |
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
import fuckitdb | |
import os | |
import random | |
email = os.environ["FUCKITDB_EMAIL"] | |
password = os.environ["FUCKITDB_PASSWORD"] | |
database = fuckitdb.Database("SecretSanta", email, password) |
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
import inspect | |
class Find(object): | |
def __div__(self, find_term): | |
frame = inspect.stack()[0][0].f_back | |
line = inspect.getframeinfo(frame)[3][0] | |
equal_index = line.index("=") | |
variable_name = line[:equal_index - 1].strip() |
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
""" | |
Concatenates all log files in directory into one file, sorted by timestamp. | |
Usage: logsplat.py directory | |
""" | |
import collections | |
import glob | |
import os | |
from operator import attrgetter |
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
def sign(number) | |
if number > 0 | |
return 1 | |
elsif number < 0 | |
return -1 | |
end | |
0 | |
end |
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
# If you're using antigen, run the following line to apply the theme. Add it to your zshrc if you want it to be permanent. | |
# antigen theme https://gist.github.com/Widdershin/a080ec7a6af0f943f40f agnoster | |
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a |
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 'rake' | |
require 'rspec/core/rake_task' | |
require ::File.expand_path('../config/environment', __FILE__) | |
# Include all of ActiveSupport's core class extensions, e.g., String#camelize | |
require 'active_support/core_ext' | |
namespace :generate do | |
desc "Create an empty model in app/models, e.g., rake generate:model NAME=User" |
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
$(document).ready(function () { | |
DiceController = { | |
dice: [], | |
$diceContainer: $('.dice'), | |
addDie: function () { | |
die = new Die (); | |
this.dice.push(die); | |
this.$diceContainer.append(die.rootNode()); |
OlderNewer