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" | |
"strconv" | |
"unsafe" | |
) | |
const ( | |
typeInt = iota |
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 ( | |
"net/http" | |
"net/http/pprof" | |
"github.com/aisk/vox" | |
) | |
func main() { |
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
04db446f5fe1dfd66b4f17e2063484ed4b33e22c3a71c49dc667143e8d26766dfdee8531eef317599b56e5ff48a584b6d2dfdd7887fb3c2980b18b3206aa2f1c91 feisuzhu |
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
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}; |
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" | |
"time" | |
"github.com/aisk/vox" | |
) | |
func timeit(ctx *vox.Context, next func()) { |
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
import sys | |
import time | |
import asyncio | |
import websockets | |
from datetime import datetime | |
last_connect_time = datetime.now() | |
@asyncio.coroutine |
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
#! /usr/bin/env python2.7 | |
import os | |
import subprocess | |
import sys | |
import tempfile | |
def is_skipped_folder(cpython_repo, path): | |
skipped_folders = [ |
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
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; |
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
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); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder