Skip to content

Instantly share code, notes, and snippets.

🍺
Drunk

An Long aisk

Block or report user

Report or block aisk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View vox_pprof.go
package main
import (
"net/http"
"net/http/pprof"
"github.com/aisk/vox"
)
func main() {
View genesis_public_key
04db446f5fe1dfd66b4f17e2063484ed4b33e22c3a71c49dc667143e8d26766dfdee8531eef317599b56e5ff48a584b6d2dfdd7887fb3c2980b18b3206aa2f1c91 feisuzhu
View tokio-echo.rs
extern crate bytes;
extern crate futures;
extern crate tokio_io;
extern crate tokio_proto;
extern crate tokio_service;
use std::io;
use std::str;
use bytes::BytesMut;
use futures::{future, Future};
View fuck.py
import requests
import flask
app = flask.Flask(__name__)
@app.route('/suck')
def suck():
return requests.get('https://httpbin.org/delay/10')
View f.go
package main
import (
"fmt"
"time"
"github.com/aisk/vox"
)
func timeit(ctx *vox.Context, next func()) {
View wstest.py
import sys
import time
import asyncio
import websockets
from datetime import datetime
last_connect_time = datetime.now()
@asyncio.coroutine
View merge_helper.py
#! /usr/bin/env python2.7
import os
import subprocess
import sys
import tempfile
def is_skipped_folder(cpython_repo, path):
skipped_folders = [
@aisk
aisk / cloud.js
Created Oct 11, 2016
LeanCloud WeApp Integration
View cloud.js
AV.Cloud.define('loginWeApp', function(request, response) {
var WX_APP_ID = 'WX_APP_ID'
var WX_SECRET = 'WX_SECRET';
var code = request.params.code;
var signature = request.params.signture;
var rawData = request.params.rawData;
var userInfo = JSON.parse(rawData);
var openid, user;
View dump.js
var fs = require('fs');
var router = require('express').Router();
var heapdump = require('heapdump');
var AV = require('leanengine');
router.post('/snapshot', function(req, res, next) {
var name = 'dump_' + Date.now() + '.heapsnapshot';
heapdump.writeSnapshot('/tmp/' + name, function(err, filename) {
if(err) {
return next(err);
@aisk
aisk / 0_reuse_code.js
Created Feb 12, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.