GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
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
# A stack, using bash arrays. | |
# --------------------------------------------------------------------------- | |
# Create a new stack. | |
# | |
# Usage: stack_new name | |
# | |
# Example: stack_new x | |
function stack_new | |
{ |
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 ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } | |
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } | |
function trim(s) { return rtrim(ltrim(s)); } | |
BEGIN { | |
# whatever | |
} | |
{ | |
# whatever | |
} | |
END { |
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
gnome-cups-manager | |
------------------ | |
Once upon a time there was a printer who lived in the woods. He was a | |
lonely printer, because nobody knew how to configure him. He hoped | |
and hoped for someone to play with. | |
One day, the wind passed by the printer's cottage. "Whoosh," said the | |
wind. The printer became excited. Maybe the wind would be his | |
friend! |
This is some superscript text.
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
# -*- coding: utf-8 -*- | |
""" | |
Get maximum pipe size (F_GETPIPE_SZ) | |
See http://man7.org/linux/man-pages/man2/fcntl.2.html | |
""" | |
import fcntl | |
import os | |
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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
Moved to git-repository: https://github.com/denji/awesome-http-benchmark
Located in alphabetical order (not prefer)
- ab – slow and single threaded, written in
C
- apib – most of the features of ApacheBench (
ab
), also designed as a more modern replacement, written inC
- autocannon – fast HTTP/1.1 benchmarking tool written in Node.js
- baloo – Expressive end-to-end HTTP API testing made easy, written in Go (
golang
)
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
<?php | |
// Get 10mb of data from /dev/zero | |
$infp = fopen('/dev/zero', 'r'); | |
$data = fread($infp, 1024 * 1024 * 10); | |
fclose($infp); | |
write_data($data); | |
echo "Peak memory usage: ", number_format(memory_get_peak_usage()), " bytes\n"; |
OlderNewer