Skip to content

Instantly share code, notes, and snippets.

diff --git main/php.h main/php.h
index c2d0d93..d9be0fa 100644
--- main/php.h
+++ main/php.h
@@ -245,6 +245,8 @@ END_EXTERN_C()
/* macros */
#define STR_PRINT(str) ((str)?(str):"")
+#define _STRINGIFY(x) #x
+#define STRINGIFY(x) _STRINGIFY(x)
#!/bin/bash
if [ $# -lt 3 ]; then
echo "usage: mirror-git <source repo> <local cache> <destination repo>" >&2
exit 1
fi
SOURCE=$1
LOCAL_CACHE=$2
DESTINATION=$3
@haegrr
haegrr / config
Created March 18, 2014 22:19
ncmpcpp config
mpd_host = "[email protected]"
mpd_port = "6600"
mpd_music_dir = "/path/to/music"
mpd_stream = "http://mpd.example.com/mpd.mp3"
message_delay_time = "3"
playlist_shorten_total_times = "yes"
playlist_display_mode = "columns"
browser_display_mode = "columns"
search_engine_display_mode = "columns"
playlist_editor_display_mode = "columns"
#!/usr/bin/env python
import sys, os, types, errno, shutil
import pkg.server.depot as ds
import pkg.server.repository as sr
# monkeypatch pkg.server.face.init (noop)
import pkg.server.face
pkg.server.face.init = lambda depot: None

Flying Widgets adds CSS3 transitions to your dashboard, allowing you to cycle through multiple widget sets on a single TV without page reloads, using stylish CSS3 transitions. You can even still re-order your widgets and save their locations!

Note that sinatra-cyclist is a potential alternative if the machine you use to display your dashboards is lacking in graphics horsepower.

To use, put this file in assets/javascripts/cycleDashboard.coffee. Then find this line in application.coffee:

    $('.gridster ul:first').gridster
--- a/disasm.cc 2014-05-29 21:52:40.000000000 +0200
+++ b/disasm.cc 2014-05-29 21:52:51.000000000 +0200
@@ -2,6 +2,7 @@
#include <vector>
#include <string>
#include <cstring>
+#include <cstdlib>
#include <map>
/* This program disassembles an IPS file. */
#!/usr/bin/env ruby
require 'openssl'
require 'highline/import'
module Builder
class << self
include OpenSSL
@haegrr
haegrr / BackupPerforce.ini
Created July 29, 2014 14:39
Perforce backup PowerShell script
BackupBucket=backup-bucket
BackupRegion=eu-west-1
BackupIntervalFull=1W
BackupRetention=1Y
BackupEncryptionPassphrase=MYSECRET
AwsAccessKeyId=MYACCESSKEYID
AwsSecretAccessKey=MYSECRETACCESSKEY
[
{
"StackId": "arn:aws:cloudformation:eu-west-1:123456789123:stack/deis/03787040-3509-11e4-83d2-507bb00bdca0",
"EventId": "e5e454a0-3511-11e4-8f4c-50d500f62a00",
"ResourceStatus": "ROLLBACK_COMPLETE",
"ResourceType": "AWS::CloudFormation::Stack",
"Timestamp": "2014-09-05T15:32:51.428Z",
"StackName": "deis",
"PhysicalResourceId": "arn:aws:cloudformation:eu-west-1:123456789123:stack/deis/03787040-3509-11e4-83d2-507bb00bdca0",
"LogicalResourceId": "deis"
#!/bin/bash
sed_inplace() {
tmpfile=$(mktemp "$TMPDIR/unfuglify-textmate.XXXXXX")
cp "$2" "$tmpfile"
sed -E "$1" "$tmpfile" > "$2"
rm -f "$tmpfile"
}
if [ $# != 3 ]; then