Instance | Branch |
---|
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
## | |
# Put this AFTER your current | |
# /etc/hosts file contents! | |
# After that, either reboot or | |
# manually flush your DNS cache | |
## | |
127.0.0.1 google.com #} redirects to us2.startpage.com:443 | |
127.0.0.1 www.google.com #} 216.218.239.164 is the IP address for the | |
127.0.0.1 google.ca #} Google frontend Startpage and automatically |
wrk
is a modern HTTP benchmarking tool capable of generating significant load when run on a single multi-core CPU. It combines a multithreaded design with scalable event notification systems such as epoll and kqueue.
Basic Usage
wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html
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 struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
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
#!/bin/sh | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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 | |
// You can find the test data file at https://www.ravis.org/hashtag-test.zip | |
// You're gonna want to have your console output supporting UTF8 before running this, or you're | |
// gonna see a bunch of ? in the output... | |
// For curiosity's sake, post number 693,847 is an emoji hashtag: #(heart) | |