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
server { | |
listen 80; | |
server_name server.com server.local; | |
access_log /home/rho/Webroot/app/logs/access.log; | |
error_log /home/rho/Webroot/app/logs/error.log; | |
location ^~ /static { | |
root /home/rho/Webroot/app/website; # location of static directory | |
expires max; |
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
server { | |
listen 80; | |
server_name chenko.votoxvoto.com chenko.local; | |
access_log /home/rho/Webroot/chenko/logs/access.log; | |
error_log /home/rho/Webroot/chenko/logs/error.log; | |
location ^~ /static { | |
root /home/rho/Webroot/chenko/website; | |
expires max; |
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
{'Accept-Language': 'en-us,en;q=0.5', 'Accept-Encoding': 'gzip,deflate', 'X-Forwarded-Host': 'chenko.server.com', 'Keep-Alive': '10', 'X-Forwarded-For': '127.0.0.12', 'Connection': 'Keep-Alive', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Host': 'localhost:8000', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'X-Real-Ip': '127.0.0.12'} |
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
root@creat1va:/var/log# ps axut | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 0.0 0.1 10368 672 ? Ss Sep14 0:04 init [2] | |
syslog 9811 0.0 0.1 12288 636 ? Ss Sep14 0:19 /sbin/syslogd - | |
mysql 9999 0.0 4.3 249960 18620 ? Sl Sep14 2:17 /usr/sbin/mysql | |
root 11493 0.0 0.1 18612 856 ? Ss Sep14 0:12 /usr/sbin/cron | |
root 12148 0.0 0.1 19324 684 ? Ss Oct02 0:00 /usr/sbin/xinet | |
root 12150 0.0 0.8 68784 3612 ? Ss 12:50 0:00 sshd: root@pts/ | |
root 12171 0.0 0.4 19040 2116 pts/0 Ss 12:50 0:00 -bash | |
root 18170 0.0 0.2 50908 1108 ? Ss Sep15 0:00 /usr/sbin/sshd |
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
root@creat1va:~# ps axl && free -m && date | |
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND | |
4 0 1 0 18 0 10368 656 - Ss ? 0:04 init [2] | |
4 0 1367 18170 15 0 68092 3224 - Ss ? 0:00 sshd: root@pts/2 | |
4 0 1381 1367 15 0 18880 2040 wait Ss pts/2 0:00 -bash | |
0 0 8014 1381 17 0 6636 864 - R+ pts/2 0:00 ps axl | |
5 106 9811 1 15 0 12288 632 - Ss ? 0:19 /sbin/syslogd -u syslog | |
4 110 9999 1 15 0 249960 14872 stext Sl ? 2:17 /usr/sbin/mysqld --basedir=/usr --datadir=/var/l | |
5 0 11493 1 18 0 18612 856 - Ss ? 0:12 /usr/sbin/cron | |
1 0 12148 1 18 0 19324 676 - Ss ? 0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -s |
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
root@creat1va:/etc/apache2# ab -n 50000 -c 100 http://localhost:7777/ | tee /root/apache_round1 | |
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Copyright 2006 The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests | |
Completed 20000 requests |
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
if re.search('<z5>(.+)</z5', text) as match: | |
value = match.groups()[0] | |
=== | |
match = re.search('<z5>(.+)</z5', text) | |
if match: | |
value = match.groups()[0] |
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
b.c# @author Rolando Espinoza La fuente <[email protected]> | |
import httplib | |
import urllib | |
try: | |
import cStringIO as StringIO | |
except ImportError: | |
import StringIO | |
class HTTPError(Exception): |
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
************* Module gist | |
W0511: 24: TODO: handle exceptions | |
W0511: 56: TODO: extend usage examples | |
W0511: 84: TODO: allow username token by command line? | |
W0511:104: TODO: git clone option | |
W0511:114: TODO: maybe handle multiple files in gist | |
W0511:123: TODO: better way to known if gist exists | |
W0511:190: TODO: handle response errors | |
R0914: 37:main: Too many local variables (27/15) | |
R0912: 37:main: Too many branches (29/12) |
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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
"""My gist command line tool""" | |
__author__ = 'Rolando Espinoza La fuente <[email protected]>' | |
__version__ = '0.1' | |
__all__ = [''] | |
import itertools | |
import fileinput |
OlderNewer