Skip to content

Instantly share code, notes, and snippets.

Bruno Pinto bpinto

Block or report user

Report or block bpinto

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
@bpinto
bpinto / gist:5afa8b05eec7a8a6e107fd39d12be4f3
Created Mar 22, 2018
Wireguard kill-switch ignoring docker
View gist:5afa8b05eec7a8a6e107fd39d12be4f3
# Adaptation from: https://git.zx2c4.com/WireGuard/about/src/tools/wg-quick.8
PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -s 172.0.0.0/8 -j REJECT
PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -s 172.0.0.0/8 -j REJECT
@bpinto
bpinto / 429.http
Last active Mar 29, 2018
haproxy throttling
View 429.http
HTTP/1.1 429 Too Many Requests
Cache-Control: no-cache
Connection: close
Content-Type: text/html
Retry-After: 60
<html><body><h1>429 Too Many Requests</h1>
Too many requests
</body></html>
@bpinto
bpinto / cpf_generator.rb
Created Jun 12, 2012
Ruby CPF Generator
View cpf_generator.rb
class CPF
def self.generate
digits = []
9.times { digits << rand(9) }
2.times { digits << self.verification_digit_for(digits) }
digits.join
end
private
View keybase.md

Keybase proof

I hereby claim:

  • I am bpinto on github.
  • I am bpinto (https://keybase.io/bpinto) on keybase.
  • I have a public key whose fingerprint is 91D2 A4F5 FBC1 42F2 3B76 008C D64E D06C 5443 61A0

To claim this, I am signing this object:

View gist:6230978
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@bpinto
bpinto / robot.js
Created Dec 7, 2012 — forked from Firvagor/robot.js
W00t #1 YEAH!!!! (Zolmesiter)
View robot.js
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.turnLeft(robot.angle % 90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
@bpinto
bpinto / robot.js
Created Dec 5, 2012 — forked from fabiopimentel/robot.js
[CAELUM TEAM]Megatron
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
@bpinto
bpinto / robot.js
Created Dec 5, 2012 — forked from Shipow/robot.js
Shipow#001
View robot.js
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};
@bpinto
bpinto / Gemfile
Created Aug 25, 2012
Screencast Downloader
View Gemfile
source :rubygems
gem 'curb'
gem 'nokogiri'
gem 'ruby-progressbar'
group :test, :development do
gem 'pry'
end
You can’t perform that action at this time.