This file contains hidden or 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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
This file contains hidden or 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
var net = require("net"); | |
var Proxy = function() { | |
}; | |
Proxy.to = function(dst_host, dst_port) { | |
var proxy = new Proxy(); | |
proxy.dstHost = dst_host; | |
proxy.dstPort = dst_port; | |
proxy.mid = []; | |
return proxy; |
This file contains hidden or 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 "event.h" | |
void craftIk_epoll_init( struct craftIk_epoll* epoll, int listenfd, int max_clients) | |
{ | |
struct epoll_event ev; | |
epoll->listenfd = listenfd; | |
epoll->max_clients = max_clients; | |
epoll->events = (struct epoll_event*)malloc( sizeof(struct epoll_event) * max_clients ); |
This file contains hidden or 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" | |
"os" | |
"syscall" | |
) | |
const ( | |
MaxEpollEvents = 32 |
This file contains hidden or 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
using System; | |
namespace MersenneTwister | |
{ | |
// Implementation porting from C version of mt19937-64 | |
// coded by Makoto Matsumoto and Takuji Nishimura | |
// | |
// Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, | |
// All rights reserved. | |
// |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [[ ! ( # any of the following are not true | |
# 1st arg is an existing regular file | |
-f "$1" && | |
# ...and it has a .ipa extension | |
"${1##*.}" == "ipa" && | |
# 2nd arg is an existing regular file | |
-f "$2" && | |
# ...and it has an .mobileprovision extension |
This file contains hidden or 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 httpclient | |
import ( | |
"net" | |
"net/http" | |
"time" | |
) | |
type Config struct { | |
ConnectTimeout time.Duration |
This file contains hidden or 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 ( | |
"log" | |
"os" | |
"syscall" | |
) | |
func main() { | |
f, err := os.Open("/tmp/pipe") |
This file contains hidden or 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
#!/usr/bin/env dash | |
base64 -d <<__EOH__ | exec gzip -dc | |
H4sIAK1zzVIAA7VaUXajMAx8+c0V+sMRYCHk5XGUPQP3/900JViWZiTZ6farxa5tzUgjWTAM8ufr | |
77jNy3bblnGbxnH/eXATD85Zk3z4ejLW/7cPnT9XdZ5Rn2eyB1wmOTY9xya5v551UytM37s8xm1Z | |
ytH18w6bTksOO47lvyFe9M7jTtEPjAP2LZqKaqv1mHV//QrHECCd/J1LTefS0/aYElYNcD4z4w3D | |
2nPo95k1UcbV4GFfI7MYqc4972LC/Jww7/L/tC8WeyLS5h5+roAZai2NE85d0vTCVtZ6OfwOorXT | |
emh+bFzOtmPWvD3mMusuf9XKueon3McbA3kn9uZguxaehJcYh2U41QhonDxYIu4dDUhgpCWiflZv | |
3Kop1zOJeooeAMj0xAFUoznrPeRsPAOEImHkjhyXJbaCYkXSgWYdydZ9FTd1IDRIwLU4slvdYB2c | |
7Rxh+oX4q0YY+CRC/P58cLeIw5OZ8mF6/RqKK4uT9kpBpd/WwkEUC71bt0NpZlwEeBdSBruaAyes |
This file contains hidden or 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
// The biggest 64bit prime | |
#define P 0xffffffffffffffc5ull | |
#define G 5 | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
// calc a * b % p , avoid 64bit overflow |
OlderNewer