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 ( | |
"database/sql" | |
"log" | |
"sync" | |
"time" | |
_ "github.com/go-sql-driver/mysql" | |
) |
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 "fmt" | |
func teaEncrypt(v [2]uint32, k [4]uint32) [2]uint32 { | |
var v0, v1, sum uint32 = v[0], v[1], 0 /* set up */ | |
var delta uint32 = 0x9e3779b9 /* a key schedule constant */ | |
k0, k1, k2, k3 := k[0], k[1], k[2], k[3] /* cache key */ | |
for i := 0; i < 32; i++ { /* basic cycle start */ | |
sum += delta |
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 "fmt" | |
func skip32Encrypt(number uint32, key string) uint32 { | |
return skip32(number, key, true) | |
} | |
func skip32Decrypt(number uint32, key string) uint32 { | |
return skip32(number, key, false) |
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
# -*- coding: utf-8 -*- | |
import random | |
import socket | |
from contextlib import contextmanager | |
from functools import partial | |
from zlib import crc32 | |
from datetime import datetime, date, timedelta | |
from threading import Lock, local | |
from django.db import router, connections, DEFAULT_DB_ALIAS |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, unicode_literals, division, print_function | |
import time | |
import hashlib | |
import itertools | |
import functools | |
from redis.exceptions import RedisError |
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
update-rc.d logstash-shipper defaults | |
update-rc.d logstash-reader defaults |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My awesome app</title> | |
</head> | |
<body> | |
<h2>beta builds</h2> | |
<a href="itms-services://?action=download-manifest&url=http://dl.dropbox.com/u/1001/manifest.plist">Awesome App v 0.0.16</a></body> | |
<h2>alpha builds</h2> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> | |
<array> | |
<dict> |
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 | |
set -u | |
# Setup architectures, library name and other vars + cleanup from previous runs | |
ARCHS=("armv7" "armv7s" "i386") | |
SDKS=("iphoneos" "iphoneos" "macosx") | |
LIB_NAME="libevent-2.0.21-stable" | |
TEMP_DIR="$(pwd)/tmp" | |
TEMP_LIB_PATH="$(pwd)/tmp/${LIB_NAME}" |