Skip to content

Instantly share code, notes, and snippets.

View pingf's full-sized avatar
💭
waiting for delivery!

Makefile君 pingf

💭
waiting for delivery!
View GitHub Profile
@pingf
pingf / logging.yaml
Created November 10, 2018 06:25 — forked from JesseBuesking/logging.yaml
Testing MultiProcessingLog on both Windows 7 Enterprise and Ubuntu Developers Version 10.04_20121120.
---
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(name)-20s%(levelname)-8s%(message)s"
handlers:
console:
class: logging.StreamHandler
level: DEBUG
#!/usr/bin/python2
# -*- coding:utf-8 -*-
import requests
import time
import hashlib
from Crypto.Cipher import AES
import base64
import json
@pingf
pingf / psycopg2_performance.py
Created February 15, 2019 03:57 — forked from wizzat/psycopg2_performance.py
Psycopg2 vs Psycopg2cffi, Python 2.7.3 vs Pypy-2.0.1 benchmark
try:
from psycopg2cffi import compat
compat.register()
except ImportError:
pass
from pyutil.decorators import *
import tempfile, psycopg2, psycopg2.extras
def setup_test_table(conn):
@pingf
pingf / simple_lang.js
Created February 21, 2019 02:18 — forked from JustinSDK/simple_lang.js
simple_lang.js - this gist has evolved into https://github.com/JustinSDK/toy_lang
// === Tokenizer
class Tokens {
constructor(tokens) {
this.head = tokens[0];
this.tail = tokens.slice(1);
}
}
class Tokenizer {
@pingf
pingf / processify.py
Created April 26, 2019 03:22 — forked from schlamar/processify.py
processify
import os
import sys
import traceback
from functools import wraps
from multiprocessing import Process, Queue
def processify(func):
'''Decorator to run a function as a process.
Be sure that every argument and the return value
@pingf
pingf / simpletun.c
Created July 29, 2019 11:16 — forked from rickyzhang-cn/simpletun.c
一个简单的使用tun/tap建立tunnel的示例代码
/**************************************************************************
* simpletun.c *
* *
* A simplistic, simple-minded, naive tunnelling program using tun/tap *
* interfaces and TCP. Handles (badly) IPv4 for tun, ARP and IPv4 for *
* tap. DO NOT USE THIS PROGRAM FOR SERIOUS PURPOSES. *
* *
* You have been warned. *
* *
* (C) 2009 Davide Brini. *
@pingf
pingf / ipvlan_l3_mode_example.md
Created July 30, 2019 10:54 — forked from nerdalert/ipvlan_l3_mode_example.md
IPVlan L3 Mode Two Host Example

Quick Paste Ipvlan L3 Instructions

  • Host #1
ip netns add ns1
ip link add link eth1 ipvl1 type ipvlan mode l3
ip link set dev ipvl1 netns ns1

ip netns exec ns1 bash
@pingf
pingf / WebGL-frameworks-libraries.md
Created April 27, 2020 06:50 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • Filament: Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
  • ClayGL: A WebGL graphic library helping you to
@pingf
pingf / open-source-sso.md
Created April 28, 2020 07:58 — forked from thomasdarimont/open-source-sso.md
Comparison of open-source SSO implementations