Skip to content

Instantly share code, notes, and snippets.

👨‍🎓
I may be slow to respond.

Fernando Jorge Mota fjorgemota

👨‍🎓
I may be slow to respond.
Block or report user

Report or block fjorgemota

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fjorgemota
fjorgemota / gist:1609192
Created Jan 13, 2012
Benchmarking of my WebServer with the HTTP/1.1 specifications and timeout running in Ubuntu with Python 2.7 and epoll
View gist:1609192
fernando@ubuntu:/etc$ ab -n 10000 -c 25 http://127.0.0.1/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@fjorgemota
fjorgemota / gist:1519616
Created Dec 25, 2011
Benchmarking of my WebServer - Updated with the HTTP/1.1 Specifications
View gist:1519616
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
@fjorgemota
fjorgemota / gist:1469666
Created Dec 12, 2011
Apaga todos os arquivos com "conflicted" no nome. Que o Dropbox costuma gerar quando há dois usuários editando o mesmo arquivo
View gist:1469666
import os, os.path
def ren(path):
files = os.listdir(path)
for f in files:
if f in (".",".."):
continue
f = os.path.join(path,f)
if os.path.isdir(f):
ren(f)
else:
@fjorgemota
fjorgemota / gist:1358191
Created Nov 11, 2011
Apache Bench 2M requests (Benchmarking of my server)
View gist:1358191
My Server:
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
@fjorgemota
fjorgemota / SplitIterator.py
Created Oct 1, 2011
Iterator Python que permite dar split em uma String progressivamente conforme o decorrer de um Loop
View SplitIterator.py
def SplitIterator(s,separator):
s = list(s)
c = 0
l = len(separator)
separator = list(separator)
last_token = []
while s[c:]:
if s[c:c+l] == separator:
a = "".join(last_token)
last_token = []
You can’t perform that action at this time.