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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Indent</string> | |
<key>scope</key> | |
<string>source.lua</string> | |
<key>settings</key> | |
<dict> |
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 python | |
import itertools | |
def f(a, b, c, d): | |
return a*b + b*c + c*d + a*d | |
print max(f(*p) for p in itertools.permutations([1,2,3,4])) |
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
groups: | |
default: | |
default: true | |
permissions: | |
- modifyworld.* | |
- bukkit.broadcast.user | |
- group.default | |
- ultimatearena.player | |
- hcw.ban.world.world |
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
if(location.search == "?music") { | |
//Do music! | |
var clientId = "dd250c3d9ef318565e6f22e871b87fb8"; | |
var musicUrl = "http://soundcloud.com/alex-nicholls/snakes-theme"; | |
$.getJSON( | |
'http://api.soundcloud.com/resolve.json?callback=?', { | |
url: musicUrl, | |
client_id: clientId | |
}, function(data) { | |
if(data.streamable && data.stream_url) { |
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
var keys = {up: 38, right: 39, down: 40, left: 37}; for(var i = 65; i < 91; i++) keys[String.fromCharCode(i+32)] = 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
set -g default-terminal "screen-256color" | |
#key bindings | |
#window splitting | |
unbind % | |
bind - split-window -v | |
bind \ split-window -h | |
#window resizing |
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
from functools import wraps | |
#Create a class to house the methods | |
class fires(object): | |
@staticmethod | |
def whenCalled(event): | |
e = (lambda s: getattr(s, event)) if type(event) == str else (lambda s: event) | |
def decorator(f): | |
"""Fires the event before the function executes""" |
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 | |
git filter-branch -f --tag-name-filter cat --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
case an in |
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 | |
git filter-branch -f --tag-name-filter cat --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_NAME" = "ew3" ] |
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
t,n='HACKERCUP',input() | |
for i in range(n):s=raw_input();print'Case #%d: %d'%(i+1,min(s.count(l)/t.count(l) for l in t)) |