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
from google.protobuf import service | |
from test_pb2 import TestService_Stub, TestService, TestMessage, TestClientService, TestClientService_Stub | |
import asyncore, threading, socket, struct | |
class ServerService(TestService): | |
def setStub(self, ch): | |
self.stub = TestClientService_Stub(ch) | |
def Test(self, controller, reply, done): | |
msg = TestMessage() |
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
/** | |
* Created with JetBrains PhpStorm. | |
* User: Usbuild | |
* Date: 12-12-20 | |
* Time: 上午10:21 | |
*/ | |
(function ($) { | |
$.fn.at_complete = function (options) { | |
var opts = $.extend({}, $.fn.at_complete.defaults, options); |
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 bash | |
set -o errexit #abort if any command fails | |
me=$(basename "$0") | |
help_message="\ | |
Usage: $me [-c FILE] [<options>] | |
Deploy generated files to a git branch. | |
Options: |
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
function loadScript(js, cb) { | |
var script = document.createElement("script"); | |
script.src = js; | |
script.onload = function() { | |
if (cb) { cb(); } | |
}; | |
document.querySelector("body").appendChild(script); | |
} | |
function loadCSS(css, cb) { |
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
// | |
//#pragma once | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE | |
#endif | |
#include <stddef.h> | |
#include <string> | |
#include <sys/time.h> | |
#include <time.h> |
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 | |
from flask import Flask, jsonify, request | |
from threading import Thread, Lock | |
from collections import defaultdict | |
import time | |
import urllib | |
import random | |
import logging | |
import json |
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
#include "co.hpp" | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <map> | |
#include <mutex> | |
using namespace pm::common; |
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
set nocompatible | |
filetype off | |
set nu | |
colo desert | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Bundle 'gmarik/vundle' | |
Bundle 'tpope/vim-fugitive' |
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 bash | |
#install tmux git subversion wget uuid-dev liblzma-dev libgdbm-dev libncurses5-dev libbz2-dev libssl-dev libreadline-dev libsqlite3-dev libffi-dev | |
if [[ 1 -eq 2 ]]; then | |
echo "set-option -g default-shell /bin/zsh" > ~/.tmux.conf | |
mkdir ~/usr | |
mkdir ~/download |
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
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#define CODE_SIZE 200 | |
typedef union slot_t { |
OlderNewer