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
function fromISO8601(str) { | |
var o = function(s) { return (s || '+') == '-' ? -1 : 1 } // Offset (pos/neg) | |
, i = function(s) { return s ? parseInt(s, 10) : 0; } // Integer (smart 0 handling) | |
, m = str.match(/(\d\d\d\d)-(\d\d)-(\d\d)(?:[T ](\d\d):?(\d\d):?(\d\d)?(?:Z?([+-]?)(\d\d):?(\d\d)?)?)?/) | |
, d = new Date() | |
; | |
d.setUTCFullYear(i(m[1])); | |
d.setUTCMonth(i(m[2])); |
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 | |
cat << EOF > /etc/apt/sources.list.d/testing.list | |
deb http://ftp.de.debian.org/debian/ squeeze main contrib non-free | |
deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free | |
EOF | |
cat << EOF > /etc/apt/preferences | |
Package: * | |
Pin: release a=stable |
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
#include <stdio.h> | |
#include <uuid/uuid.h> | |
#include <sys/types.h> | |
u_int64_t bits2uint64(unsigned char const bits[]) { | |
return ((u_int64_t)bits[0] << 56) | |
| ((u_int64_t)bits[1] << 48) | |
| ((u_int64_t)bits[2] << 40) | |
| ((u_int64_t)bits[3] << 32) |
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
package main | |
import ( | |
"github.com/streadway/amqp" | |
"log" | |
"time" | |
) | |
const ( | |
writeURL = "amqp://localhost/" |