Skip to content

Instantly share code, notes, and snippets.

@Maqiushi
Maqiushi / postFile.lua
Created May 24, 2017 08:04
simple wrk benchmark for posting binary file
--Read the binary file, lua takes binary files with no difference to strings(all UNIX;https://www.lua.org/pil/21.2.2.html). But, use 'b' tag
local inp = assert(io.open("xxxx.xml.gz", "rb"))
local data = inp:read("*all")
--HTTP custom settings
--Remember to set the schema, host and port here otherwise it will use default.
wrk.scheme = "http"
wrk.host = "localhost"
wrk.port = 3000
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# 1. Download SVG
if [ ! -f logo.svg ]; then
curl https://www.python.org/static/community_logos/python-logo-inkscape.svg > logo.svg
fi
# -----------------------------------------------------------------------------
@dansimau
dansimau / git-unmerged.py
Last active April 22, 2019 04:52
Report branches or commits that are not yet merged into master.
#!/usr/bin/python
"""
Report branches or commits that are not yet merged into master.
"""
import subprocess
from os.path import basename
# Merge/environment branches. These will be excluded from the
# "unmerged branches" list.
EXCLUDE_BRANCHES = ['staging', 'uat', 'production', 'master']
@jhjguxin
jhjguxin / nginx-403-forbidden-error-hosting-in-user-home-directory.md
Created August 12, 2013 05:40
nginx 403 forbidden error when server static file under user home directory