Skip to content

Instantly share code, notes, and snippets.

View ton-katsu's full-sized avatar
💭
Thank you Microsoft

ton-katsu ton-katsu

💭
Thank you Microsoft
View GitHub Profile
@fkei
fkei / Makefile
Last active November 8, 2017 02:07
ffmpeg/imagemagick compile script (include libx264/ffmpeg,ffprobe/convert only/arch=x86_64 only/not doc/static library)
__os=$(shell uname)
__wget=$(shell which wget)
__tar=$(shell which tar)
__make=$(shell which make)
__mkdir=$(shell which mkdir)
__cp=$(shell which cp)
__rm=$(shell which rm)
__prefix=$(shell pwd)/build
__include=$(__prefix)/include
@t9md
t9md / apm_list
Last active August 29, 2015 14:24
Atom
$ apm list
Built-in Atom packages (88)
├── archive-view@0.58.0
├── atom-dark-syntax@0.27.0
├── atom-dark-ui@0.49.0
├── atom-light-syntax@0.28.0
├── atom-light-ui@0.41.0
├── autocomplete-atom-api@0.9.0
├── autocomplete-css@0.8.0
├── autocomplete-html@0.7.2
@trungly
trungly / simple_server.py
Last active February 1, 2024 18:51
A simple Python HTTP server that supports a GET that echoes some request data and a POST that reads a request body, parses it as JSON and responds with part of the data
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse, json
class GetHandler(BaseHTTPRequestHandler):
def do_GET(self):
parsed_path = urlparse.urlparse(self.path)
message = '\n'.join([
'CLIENT VALUES:',
'client_address=%s (%s)' % (self.client_address,
@philwo
philwo / vmstat.py
Created November 12, 2012 09:19
vmstat output pre-processor
#!/usr/bin/env python
'''
tr -s ' ' < tpcc_pg_report.vmstat | sed 's/^ //g' | sed 's/ /,/g' > tpcc_pg_report.vmstat.csv
'''
from __future__ import division
import csv
from itertools import izip_longest
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active June 11, 2024 08:36
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request: