Skip to content

Instantly share code, notes, and snippets.

View peritus's full-sized avatar
🌴
On vacation

Filip Noetzel peritus

🌴
On vacation
View GitHub Profile
@peritus
peritus / FIREFOX_OS_HACKDAY.md
Last active December 12, 2015 01:28
Short write-up of my ideas for the Firefox OS App Day in Berlin 2013

Ideas: Firefox OS App Day - Berlin

More info on Firefox OS App Day Berlin

Mobile Hypertext fiction

Wikipedia on hypertext fiction

Hypertext fiction is a genre of electronic literature, characterized by the use of hypertext links which provide a new context for non-linearity in "literature" and reader interaction.[1] The reader typically chooses links to move from one node of text to the next, and in this fashion arranges a story from a deeper pool of potential stories. Its spirit can also be seen in interactive fiction.
function(doc) {
// stolen from
// https://github.com/sstephenson/prototype/blob/master/src/prototype/lang/object.js#L88
function extend(destination, source) {
for (var property in source)
destination[property] = source[property];
return destination;
}
var copy = extend({}, doc);
@peritus
peritus / build_step.sh
Created May 9, 2011 16:31
Shuts down idle jenkins instances
#
# This script shuts down my AWS EC2 hosted Jenkins if
# there were no builds in the last hour.
#
# Set this script to run as build step in jenkins every minute like this
#
# [x] Build periodically
#
# Schedule * * * * *
#
@peritus
peritus / test-git-diff-index-ctime.sh
Created April 22, 2011 09:14
git-describe doesn't update the index, so the dirty flag is not accurate
#!/bin/sh -e
# BOTTOM LINE:
#
# You have to call `git update-index --refresh` before calling
# `git describe` or the dirty flag might be inaccurate.
# Discussion:
# https://twitter.com/peritus/status/61361229876314112
# https://twitter.com/artagnon/status/61471028567752704
@peritus
peritus / moocrop.rb
Created April 11, 2011 09:31
MOOCROP - Creates detail views of high-resolution photos suitable for creating moocards
#!/usr/bin/env ruby
# MOOCROP
#
# Results: http://ueberredungskunst.aadabay.com/moo-minicards
#
# Creates detail views of high-resolution photos suitable for creating moocards
# Slices in variations of top-left corner and scale
#
# Results after first order (used http://aadabay.com/ paintings: WOW!)
@peritus
peritus / rsync_provisioner.rb
Created January 22, 2011 07:48
I want to 'vagrant destroy' and 'vagrant up' vms when on the train, plane and bus
# Vagrant Rsync Provisioner
#
# TODO: Make the download commands available via 'vagrant rsync_download'
#
# == Motivation ==
#
# I want to 'vagrant destroy' and 'vagrant up' vms when on the train, plane and
# bus. Not fetching debian packages also tends to make provisioning with chef
# faster.
#
[alias]
st = status -uall
sts = status -uall -sb
d = diff
puff = pull --ff-only
dw = diff --color-words
dc = diff --cached
dcw = diff --cached --color-words
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative
log1 = log --pretty=oneline --abbrev-commit --decorate
" disable cursor keys to train Filip's muscular memory
noremap <Up> ""
noremap! <Up> <Esc>
noremap <Down> ""
noremap! <Down> <Esc>
noremap <Left> ""
noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>
#!/bin/bash
. "$(git --exec-path)/git-sh-setup"
test -e `git --exec-path`/git-http-backend||die "git-http-backend does not exist, upgrade to git >= 1.6.6"
test -d $GIT_DIR/gitweb || die "$GIT_DIR/gitweb does not exist, try running 'git instaweb -d webrick'"
test -e $GIT_DIR/gitweb/webrick || die "$GIT_DIR/gitweb/webrick does not exist, try running 'git instaweb -d webrick'"
GIT_BIN=`git --exec-path`/git
CGI_NAME=`basename \`pwd\``.cgi
me@box ~ $ wget -S -O /dev/null http://github.com/feeds/simonw/commits/djng/master
--2010-03-04 08:39:43-- http://github.com/feeds/simonw/commits/djng/master
Resolving github.com (github.com)... 207.97.227.239
Connecting to github.com (github.com)|207.97.227.239|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.61
Date: Thu, 04 Mar 2010 07:39:42 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive