Skip to content

Instantly share code, notes, and snippets.

View xikaos's full-sized avatar

Francisco Budaszewski Zanatta xikaos

  • Tiny ERP by Olist
  • Brazil
  • 03:01 (UTC -03:00)
View GitHub Profile
# Entrar no servidor e fora da pasta do projeto
$ git init --bare repo
Criar hooks post-receive
$ cd repo/hooks
$ nano post-receive
## Adicionar no arquivo
@xikaos
xikaos / tcpdump http monitoring
Last active January 12, 2018 21:31 — forked from bahayman/gist:9369651
tcpdump http monitor
~// WARNING: The command DOES NOT WORK if you don't have root access to yout network device. Prepend sudo if you are not root. \\~
Use TCPDUMP to Monitor HTTP Traffic
1. To monitor HTTP traffic including request and response headers and message body:
tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
2. To monitor HTTP traffic including request and response headers and message body from a particular source:
tcpdump -A -s 0 'src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
@xikaos
xikaos / .htaccess
Last active April 13, 2016 18:31 — forked from Jesm/.htaccess
Just some trivial tasks to do with .htaccess
<IfModule mod_rewrite.c>
# Redirect to another domain
RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # Here goes the regex to match the domain that will be redirected
RewriteCond %{HTTP_HOST} ^(www\.)?example\.net$ [NC] # Create a new condition for every domain, if possible
RewriteRule ^(.*)$ http://www.example.it/$1 [R=301,NC,L]
# Force redirect to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.