Skip to content

Instantly share code, notes, and snippets.

View thiagozs's full-sized avatar
:octocat:
Have a nice day

Thiago Zilli Sarmento thiagozs

:octocat:
Have a nice day
View GitHub Profile
@thiagozs
thiagozs / sublime_shortcuts.txt
Created July 31, 2013 17:33
Sublime Text 2 ShortCuts
h1. Sublime Text 2 - Useful Shortcuts (PC)
Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/.
h2. Editing
| *Ctrl+C* | copy current line (if no selection) |
| *Ctrl+X* | cut current line (if no selection) |
| *Ctrl+⇧+K*| delete line |
| *Ctrl+↩* | insert line after |
@thiagozs
thiagozs / grrr
Created September 10, 2013 17:59
Download from apache with check geo targeting
#!/bin/bash
# author: André Kelpe <efeshunderelf at googlemail.com>
# licencse: Apache v2
GRRR_WGET_OPTIONS="--user-agent grrr/1.0"
# find out our region and yes, you can get this as csv file. How cool is that?
GEOIP_REGION=$(wget -qO- freegeoip.net/csv/ | tr '[A-Z]' '[a-z]' | tr -d '"'| awk -F, '{print $2}')
@thiagozs
thiagozs / zookeeper.txt
Created September 20, 2013 18:16
Zookeeper config Step-by-step
mkdir -p /home/zilli/zookeeper/zk-server-1 \
/home/zilli/zookeeper/zk-server-2 \
/home/zilli/zookeeper/zk-server-3 \
/home/zilli/zookeeper/zk-server-4 \
/home/zilli/zookeeper/zk-server-5
mkdir -p /home/zilli/zookeeper/data/zk1 \
/home/zilli/zookeeper/data/zk2 \
/home/zilli/zookeeper/data/zk3 \
/home/zilli/zookeeper/data/zk4 \
@thiagozs
thiagozs / mongodb-import-export.txt
Created September 20, 2013 18:18
MongoDB import and export
mongodb/bin/mongoexport -d produtos -c rt_produtos_v2 --host 127.0.0.1 --port 3000 -o /tmp/produtos_zilli.json
mongodb/bin/mongoimport -d produtos -c rt_produtos_v2 --host 127.0.0.1 --port 27017 --file produtos_zilli.json
@thiagozs
thiagozs / messagepack.md
Created September 25, 2013 13:30
MessagePack overview a tutorial
@thiagozs
thiagozs / BenchMarkRedis1ObjectSerializado.md
Created September 25, 2013 15:21
BenchMark Redis com lista de 1 objeto serializado

BenchMark Redis com lista de 1 objeto serializado

#####json redis 127.0.0.1:6379> debug object lista Value at:0x7f072ac17470 refcount:1 encoding:linkedlist serializedlength:339 lru:1696873 lru_seconds_idle:10 Resultado -> serializedlength:339

#####messagepack + json redis 127.0.0.1:6379> debug object lista Value at:0x7f072ac16b90 refcount:1 encoding:linkedlist serializedlength:341 lru:1696878 lru_seconds_idle:0

@thiagozs
thiagozs / openrtb-iab-category.md
Created September 27, 2013 17:30
IAB OpenRTB Category

###IAB1 Arts & Entertainment IAB1-1 Books & Literature
IAB1-2 Celebrity Fan/Gossip
IAB1-3 Fine Art
IAB1-4 Humor
IAB1-5 Movies
IAB1-6 Music
IAB1-7 Television

###IAB2 Automotive

@thiagozs
thiagozs / nodejs-forever-Makefile
Created October 7, 2013 17:36
Node.js Forever Makefile tasks.
#
# Tasks
#
# - start :: starts application using forever
# - stop :: stops application using forever
# - restart :: restart application using forever
#
# This set's your local directory to to your NODE_PATH
NODE_EXEC = NODE_PATH=.:$(NODE_PATH)
@thiagozs
thiagozs / forever-start.sh
Last active December 24, 2015 22:19
shell script forever fire up
#!/bin/bash
forever -p ./logs \
-l server_out.log \
-o ./logs/server_out.log \
-e ./logs/server_err.log \
--append \
--plain \
--minUptime 1000 \
--spinSleepTime 1000 \

Keybase proof

I hereby claim:

  • I am thiagozs on github.
  • I am thiagozs (https://keybase.io/thiagozs) on keybase.
  • I have a public key whose fingerprint is 0D53 73B0 DC7B F005 145B 6F36 C16F 5FEB 7D28 A042

To claim this, I am signing this object: