This file contains 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
#! /bin/bash | |
export $GITHUBURL="$1" | |
# clean up remote branch list | |
git fetch origin; git remote prune origin | |
# delete all local branches except master | |
git checkout master; git pull; git branch | while read repo; do branch=`echo "$repo" | cut -d" " -f 2`; if [ ! $branch == 'master' ]; then git branch -D $branch; fi; done; git gc |
This file contains 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
<?php | |
if (in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1', @$_SERVER['SERVER_ADDR']))) { | |
apc_clear_cache('user'); | |
apc_clear_cache('opcode'); | |
echo json_encode(array('success' => true)); | |
} else { | |
die('SUPER TOP SECRET'); | |
} |
This file contains 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
# FIRST: Install Vagrant (http://www.vagrantup.com/) | |
# and VirtualBox (https://www.virtualbox.org/) | |
# | |
# make sure the librarian gem is installed | |
gem install librarian-chef | |
# if you use rbenv you need to execute to make the librarian-chef command available: | |
# $ rbenv rehash | |
# checkout the sandbox from GitHub | |
git clone https://github.com/Kunstmaan/KunstmaanSandbox.git | |
# move into the sandbox folder |
This file contains 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
int speakerPin = 9; | |
int length = 46; | |
String notes[] = {"G4","G4", "G4", "D#4/Eb4", "A#4/Bb4", "G4", "D#4/Eb4","A#4/Bb4", "G4", "D5", "D5", "D5", "D#5/Eb5", "A#4/Bb4", "F#4/Gb4", "D#4/Eb4","A#4/Bb4", "G4", "G5","G4","G4","G5","F#5/Gb5", "F5","E5","D#5/Eb5","E5", "rest", "G4", "rest","C#5/Db5","C5","B4","A#4/Bb4","A4","A#4/Bb4", "rest", "D#4/Eb4", "rest", "F#4/Gb4", "D#4/Eb4","A#4/Bb4", "G4" ,"D#4/Eb4","A#4/Bb4", "G4"}; | |
int beats[] = { 8, 8, 8, 6, 2, 8, 6 , 2 ,16 , 8, 8, 8, 6, 2, 8, 6, 2, 16,8,6,2,8,6,2,2, 2, 2,6,2,2,8,6,2,2,2,2,6,2,2,9,6,2,8,6,2,16 }; | |
int tempo = 50; | |
void playTone(int tone, int duration) { | |
for (long i = 0; i < duration * 1000L; i += tone * 2) { | |
digitalWrite(speakerPin, HIGH); | |
delayMicroseconds(tone); |