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
; F7 wins you a gold medal! | |
#MaxHotkeysPerInterval 5000 | |
{ | |
$F7:: | |
Loop | |
{ | |
if not GetKeyState("F7", "P") | |
break | |
else |
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
; Basketball doodle helper. Consistent throws everytime. ;-) | |
; Still need a bit of skill to time the ball pickup correctly though. | |
Throw(time) | |
{ | |
Send {Space} | |
sleep time | |
Send {Space} | |
return | |
} |
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
" .vimrc | |
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details | |
" For multi-byte character support (CJK support, for example): | |
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1 | |
set nocompatible " be iMproved | |
set nocompatible " be iMproved | |
set pastetoggle=<F2> |
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
for file in $(find * -name "*.py"); do | |
awk '{if($1 > 0){ len+=length; count+=1 }}; END {if(count > 0) {print len/count, "\t", FILENAME} }' $file | |
done | sort -k 1 -n -r |
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
98.7973 |
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
pkgname=vagrant | |
pkgver=1.2.1 | |
pkgrel=4 | |
pkgdesc="Tool for building and distributing virtualized development environments" | |
arch=('i686' 'x86_64') | |
url='http://vagrantup.com/' | |
license=('MIT') | |
depends=('ruby' 'virtualbox>=4.0' 'ruby-net-ssh>=2.6.6' \ | |
'ruby-net-scp>=1.1.0' 'ruby-erubis>=2.7.0' 'ruby-i18n>=0.6.0' \ | |
'ruby-log4r>=1.1.9' 'ruby-childprocess>=0.3.7') |
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
pguser: | |
postgres_user: | |
- present | |
- name: {{ pillar['dbuser'] }} | |
- password: {{ pillar['dbpass'] }} | |
- createdb: True | |
- createuser: False | |
- superuser: True | |
- runas: postgres | |
- require: |
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 | |
def is_palindrome(num): | |
return str(num) == str(num)[::-1] | |
def closest_higher(target, collection) : | |
"""Return the closest number to `target` in `collection` | |
that is higher than `target`""" | |
return max((target - i, i) for i in collection if (target - i) < 0)[1] |
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 pypy | |
def main(): | |
palindromes = [] | |
ranges = [[int(i) for i in line.split()] for line in open('seed.txt')] | |
ranges_flat = [i for r in ranges for i in r] | |
lo, hi = min(ranges_flat), max(ranges_flat) | |
while hi >= lo: | |
n = str(lo) | |
if n == n[::-1]: |
OlderNewer