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
<div id="lga"> | |
<style> | |
body{overflow:hidden}#hplogo{position:relative;width:0;margin:0 auto;right:190px;height:160px}.particle{position:absolute;z-index:-1}.circle{-moz-border-radius:160px;-webkit-border-radius:160px;-khtml-border-radius:160px;border-radius:160px}#cpf,#sbl,#fctr{background:transparent} | |
</style> | |
<noscript> | |
<style>#hplogo{right:0;width:auto;background:url(/intl/en_ALL/images/srpr/logo1w.png) no-repeat center}</style> | |
</noscript> | |
<div id="hplogo"> | |
<div class="particle circle" style="background-color: rgb(237, 157, 51); height: 18.337px; width: 18.337px; left: 200.733px; top: 77.5385px;"> | |
</div> |
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 Main{public static void main(String...args){\u0066or(int | |
\u0020$:"vÌÈÊ\"¤¾Àʲ¬Æ\"v¤Î¤\"²¤¨¸¬Æ".to\u0043h\u0061rArray() | |
)System./*goto/*$/%\u0126//^\u002A\u002Fout.print((char)(($>> | |
+(~'"'&'#'))+('<'>>('\\'/'.')/\u002Array.const(~1)\*\u002F)));}} |
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
function! NERDTreeQuit() | |
redir => buffersoutput | |
silent buffers | |
redir END | |
" 1BufNo 2Mods. 3File 4LineNo | |
let pattern = '^\s*\(\d\+\)\(.....\) "\(.*\)"\s\+line \(\d\+\)$' | |
let windowfound = 0 | |
for bline in split(buffersoutput, "\n") | |
let m = matchlist(bline, pattern) |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals> | |
<goal>exec</goal> | |
</goals> |
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
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install Django psycopg2 django-sentry | |
bin/pip freeze > requirements.txt | |
bin/django-admin.py startproject mysite | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
lib/ | |
EOF |
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
## {{{ http://code.activestate.com/recipes/577676/ (r9) | |
from collections import namedtuple | |
from math import fsum | |
def map_reduce(data, mapper, reducer=None): | |
'''Simple map/reduce for data analysis. | |
Each data element is passed to a *mapper* function. | |
The mapper returns key/value pairs | |
or None for data elements to be skipped. |
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
private static Class getClass(String classname) throws ClassNotFoundException { | |
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); | |
if(classLoader == null) | |
classLoader = Singleton.class.getClassLoader(); | |
return (classLoader.loadClass(classname)); | |
} | |
} | |
//Source: http://snehaprashant.blogspot.com/2009/01/singleton-pattern-in-java.html | |
/** The preceding method tries to associate the classloader with the current thread; if that |
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
""" | |
The MIT License | |
Source: https://github.com/simplegeo/python-oauth2/blob/master/example/client.py | |
Copyright (c) 2007 Leah Culver | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
Source: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Enable the 2D Dock | |
defaults write com.apple.dock no-glass -bool true | |
# Disable menu bar transparency | |
defaults write -g AppleEnableMenuBarTransparency -bool false |
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 Node : | |
def __init__(self,val,children) : | |
self.val = val | |
self.children = children | |
def makeRunner(f) : | |
def run(node) : | |
f(node) | |
for x in node.children : | |
run(x) |
OlderNewer