I hereby claim:
- I am maebert on github.
- I am maebert (https://keybase.io/maebert) on keybase.
- I have a public key whose fingerprint is E463 E807 A4C6 4035 31AD D5FA FA39 CA2C E213 D791
To claim this, I am signing this object:
// Without jQuery: | |
var setSplashHeight = function () { | |
document.getElementById("splash").style.height = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight; | |
} | |
setSplashHeight(); | |
window.onresize = setSplashHeight(); | |
// With jQuery: | |
var jSetSplashHeight = function () { |
#!/usr/bin/env python | |
"""Reduces dependency constraints to a minimal set. | |
Example: if a package is required in version '>2.2 >3.0 <=4.1', then >2.2 is | |
redundant in here -- it's entailed in >3.0 Likewise, in '>=4.2 !=4.2' should | |
just be '>4.2' etc. | |
This script reads in version constrains such as '>2.2 >3.0 <=4.1' and prints | |
a reduced list of constraints or unsatisfa if the constraints can't be |
I hereby claim:
To claim this, I am signing this object:
/* | |
* Arduino Mail Notification | |
* http://www.portwempreludium.de | |
* | |
* See http://portwempreludium.tumblr.com/post/13068255903/dancing-mouse for details. | |
* Based on the XMAS hitcounter by tinkerlog.com | |
*/ | |
int motorPin = 13; // control pin for servo motor | |
int mails = 0; // number of new mails |
// Provides mixins that automatically replace sprite icons with retina images on appropriate devices. | |
@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)"; | |
.sprite (@path, @size, @w, @h, @pad: 0) when (isstring(@path)) | |
{ | |
background-image: url(@path); | |
width: @size; | |
height: @size; | |
display: inline-block; |
def get_code(num, alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ"): | |
base = len(alphabet) | |
result = "" | |
num, rem = divmod(num, base) | |
while num: | |
result += alphabet[rem] | |
num, rem = divmod(num, base) | |
result += alphabet[rem] | |
return result[::-1] |
#!/bin/bash | |
# This script automatically installs a bunch of command line (Git, wget, | |
# imagemagick, ...) and GUI (Dropbox, Chrome, Skype, ...) apps on a fresh | |
# Mac. | |
# | |
# It also sets up a Python Scientific Computing environment (matplotlib, | |
# scipy, iPython Notebook, ...) | |
# | |
# Requirement: Have the XCode Command Line Tools installed (download from |
"""Wiimote wrapper class.""" | |
import cwiid | |
class Wiimote(): | |
_buttons = { | |
'B': 1<<2, 'home': 1<<7 | |
} | |
def __init__(self, calib = (100, 150, 100, 150)): | |
self.wm = None |
71750 |