Skip to content

Instantly share code, notes, and snippets.

View icsaas's full-sized avatar
🎯
saasing

iac icsaas

🎯
saasing
View GitHub Profile
@icsaas
icsaas / BitcoinHashRandom.ipynb
Created February 10, 2022 13:42 — forked from Seele0oO/BitcoinHashRandom.ipynb
TrueRandom.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am matrixorz on github.
  • I am matrixorz (https://keybase.io/matrixorz) on keybase.
  • I have a public key whose fingerprint is C953 50CD 4596 4926 CBE1 2EF9 BA30 7EE3 9B06 1EA8

To claim this, I am signing this object:

upstream trade {server 127.0.0.1:5000;}
server {
listen 80; ## listen for ipv4; this line is default and implied
server_name localhost _;
root /pathtoroot;
index index.html index.htm;
proxy_connect_timeout 900;
proxy_read_timeout 900;
proxy_send_timeout 900;
proxy_buffer_size 64k;
from __future__ import absolute_import
import signal
import gevent
import gevent.pool
from rq import Worker
from rq.timeouts import BaseDeathPenalty, JobTimeoutException
from rq.worker import StopRequested, green, blue
from rq.exceptions import DequeueTimeout
@icsaas
icsaas / occi
Created June 23, 2014 06:53
occi
// OracleTest.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "iostream"
#include <occi.h>
#pragma comment(lib,"oraocci11.lib")
using namespace oracle::occi;
@icsaas
icsaas / foo.py
Last active August 29, 2015 14:01
def foo(bar=[]):
bar.append("baz")
return bar
#include <stdio.h>
main()
{
struct A {
int a;
char b;
short c;
};
@icsaas
icsaas / BetterMap.py
Last active August 29, 2015 13:59
HashTable implemented by python
class BetterMap(object):
def __init__(self,n=100):
self.maps=[]
for i in range(n):
self.maps.append(LinearMap())
def find_map(self,k):
index=hash(k)%len(self.maps)
return self.maps[index]
@icsaas
icsaas / fix.sh
Created March 31, 2014 01:35
dpkg: warning: files list file for package `*****' missing, assuming package has no files currently installed
#!/bin/bash
set -e
# Clean out /var/cache/apt/archives
apt-get clean
# Fill it with all the .debs we need
apt-get --reinstall -dy install $(dpkg --get-selections | grep '[[:space:]]install' | cut -f1)
DIR=$(mktemp -d -t info-XXXXXX)
for deb in /var/cache/apt/archives/*.deb
@icsaas
icsaas / app.py
Last active August 29, 2015 13:57
long polling in tornado
import os
import string
import time
import logging
from datetime import datetime
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web