Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import nflgame
def fantasy_points(p, site='draftkings', player_type='offensive'):
assert player_type == 'offensive'
assert site == 'draftkings'
score = 0.0
@houbysoft
houbysoft / loginToSSH
Created October 11, 2012 06:40
How to login to SSH server without a password when public key authentication is disallowed
#!/usr/bin/expect
spawn ssh you@server
expect "password:"
send "yourpasswordgoeshere\n"
interact
jan@MacBook-Pro ~ $ echo $CLICOLOR
1
jan@MacBook-Pro ~ $ echo $LSCOLORS
gxBxhxDxfxhxhxhxhxcxcx
NSRect myRect = [self convertRect:self.bounds toView:nil];
NSPoint myPoint = [self.window convertBaseToScreen:myRect.origin];
screenshotRect = NSMakeRect(myPoint.x, myPoint.y, myRect.size.width, myRect.size.height);