Skip to content

Instantly share code, notes, and snippets.

@joscha
joscha / css-animation-keframes.sass
Created February 1, 2014 13:12
CSS animation and keyframes mixins
=keyframes($name)
@-webkit-keyframes #{$name}
@content
@-moz-keyframes #{$name}
@content
@-ms-keyframes #{$name}
@content
@-o-keyframes #{$name}
@content
@keyframes #{$name}
// jQuery Deparam - v0.1.0 - 6/14/2011
// http://benalman.com/
// Copyright (c) 2011 Ben Alman; Licensed MIT, GPL
(function($) {
// Creating an internal undef value is safer than using undefined, in case it
// was ever overwritten.
var undef;
// A handy reference.
var decode = decodeURIComponent;
@joscha
joscha / .travis.yml
Created May 27, 2014 18:14
Sample travis file for typesafe activator
language: java
env:
- ACTIVATOR_VERSION=1.1.3 \
ACTIVATOR_ZIP_FILE=typesafe-activator-${ACTIVATOR_VERSION}-minimal.zip \
ACTIVATOR_ZIP_URL=http://downloads.typesafe.com/typesafe-activator/${ACTIVATOR_VERSION}/${ACTIVATOR_ZIP_FILE} \
ACTIVATOR_BIN=${TRAVIS_BUILD_DIR}/activator-${ACTIVATOR_VERSION}-minimal/activator
install:
- wget ${ACTIVATOR_ZIP_URL}
- unzip -q ${ACTIVATOR_ZIP_FILE}
script:
@joscha
joscha / bower.json
Last active August 29, 2015 14:07 — forked from Xiphe/bower.json
{
"name": "jasmine-moar-matchers",
"authors": [
"Hannes Diercks"
],
"description": "Some additional Jasmine 2.0 Matchers.",
"main": ["toBeInstanceOf.js", "toBeTypeOf.js", "promises.js"],
"keywords": [
"jasmine",
"matcher"
@joscha
joscha / install_bcm2385.sh
Last active August 29, 2015 14:13 — forked from annem/gist:3183536
Install BCM2385 library
#!/bin/sh
set -o errexit
bcm2385_version=1.38
rm bcm2835-$bcm2385_version.tar.gz
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-$bcm2385_version.tar.gz
tar zxvf bcm2835-$bcm2385_version.tar.gz
cd bcm2835-$bcm2385_version
./configure
make
function prettifySpreadsheetJSON(data) {
var prefix = 'gsx$';
for (var i = 0; i < data.feed.entry.length; i++) {
for (var key in data.feed.entry[i]) {
if (data.feed.entry[i].hasOwnProperty(key) && key.substr(0,prefix.length) === prefix) {
data.feed.entry[i][key.substr(prefix.length)] = data.feed.entry[i][key].$t;
delete data.feed.entry[i][key];
}
}
}
// file X depending on EventEmitter
var EventEmitter = __webpack_require__(16);
// EventEmitter module
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) { ...
module.exports = EventEmitter;
@joscha
joscha / run_raopx.applescript
Created April 23, 2010 22:59 — forked from sumbach/run_raopx.applescript
added temporary file deletion
-- TODO: save as a bundle and include the RaopX application: not sure if I can do that since it also contains libsamplerate
-- For German OSX
set SoundPrefName to "Ton"
set InputPanelName to "Eingabe"
set OutputPanelName to "Ausgabe"
-- For English OSX uncomment this
-- set SoundPrefName to "Sound"
-- set InputPanelName to "Input"
@joscha
joscha / d2-Network-shutdown.py
Created April 24, 2010 23:17
Script for shutting down LaCie d2 Network version 1
#!/usr/bin/env python
''' Script for automatically shutting down LaCie d2 Network version 1
Tested with system version 2.2.5, but might also work on others '''
import crypt, sys, hmac, urllib, urllib2, cookielib
from xml.dom.minidom import parseString
''' Your user name '''
USER = u"admin"
@joscha
joscha / mount.sh
Created August 11, 2012 14:10
Shell file for mounting an encfs volume in OSX by using the keychain password
#!/bin/bash
target=/Volumes/tmp.mytarget
source=/Users/bla/Dropbox/encrypted
volname=EncodedDropbox
keychainPassword=encodedDropbox
mount | grep $target >/dev/null
[[ "$?" -eq "0" ]] && diskutil umount force $target
if [ ! -d $target ]