Skip to content

Instantly share code, notes, and snippets.

@diogoca
diogoca / gist:8186306
Created December 30, 2013 18:57
Verificar se cache do Varnish encheu
varnishstat -1 -f n_lru_nuked
@diogoca
diogoca / purge.vcl
Created January 2, 2014 13:58 — forked from ismasan/purge.vcl
# This goes in vcl_recv
# It gives you:
# curl -X PURGE http://some.example.com/.*
# curl -X PURGE http://some.example.com/blog/.*
# curl -X PURGE http://some.example.com/blog/2011/bar.html
# curl -X PURGE http://another.example.com/.*
#
if (req.request == "PURGE") {
# Wildcard, per-domain purging
purge("req.http.host == " req.http.host " && req.url ~ " req.url "$");
vboxmanage setextradata "CentOS Almanaque" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"
@diogoca
diogoca / gist:9317538
Created March 3, 2014 02:33
Google DFP (Depurar)
?google_console=1 na url e apertar CTRL + F10
@diogoca
diogoca / gist:9317548
Created March 3, 2014 02:33
Pagespeed query
?ModPagespeed=on&ModPagespeedFilters=insert_dns_prefetch,pedantic
@diogoca
diogoca / gist:9449082
Last active August 29, 2015 13:57
Linux: Config MTA Sender
alternatives --config mta
@diogoca
diogoca / gist:9464161
Last active August 29, 2015 13:57
document.write dentro do iframe
f = document.createElement('iframe');
f.src = "javascript:;";
f.seamless = true;
f.width = '100%';
f.height = 90;
f.frameborder = 0;
f.style.border = 0;
$('body').append(f);
win = f.contentWindow;
@diogoca
diogoca / gist:9921550
Created April 1, 2014 19:42
Vagrant SSH on Windows
set PATH=%PATH%;C:\Program Files (x86)\Git\bin
@diogoca
diogoca / gist:9981086
Created April 4, 2014 19:01
Using Meteor in a Shared Folder Environment
#In your home directory
meteor create newproject
#In your shared folder
meteor create newproject
#Virtual machine location first followed by shared folder location
sudo mount --bind ~/newproject/.meteor /media/sf_Program_Archive/newproject/.meteor
@diogoca
diogoca / rsync_meteor.sh
Created April 26, 2014 17:30
Rsync Linux Example
#!/bin/bash
# EXIBIR COMANDOS EXECUTADOS
set -x
while true;
do
rsync -rtvu --exclude ".*" /media/sf_meteor/microscope/ /home/microscope
rsync -rtvu --exclude "local*" /home/microscope/.meteor/ /media/sf_meteor/microscope/.meteor
sleep 5
done