Skip to content

Instantly share code, notes, and snippets.

Bruno Cassol brunocassol

Block or report user

Report or block brunocassol

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
View randomPasswordChromeBookmark.js
javascript:function lpCreatePass(length,upper,lower,digits,special,mindigits,ambig,reqevery){if(typeof(length)=="undefined"){length=8+get_random(0,1);}if(length>256){length=256;}if(mindigits>256){mindigits=256;}if(typeof(upper)=="undefined"){upper=true;}if(typeof(lower)=="undefined"){lower=true;}if(typeof(digits)=="undefined"){digits=true;}if(typeof(special)=="undefined"){special=false;}if(typeof(mindigits)=="undefined"){mindigits=0;}if(typeof(ambig)=="undefined"){ambig=false;}if(typeof(reqevery)=="undefined"){reqevery=true;}var minlower=0;var minupper=0;var minspecial=0;if(reqevery){minlower=minupper=minspecial=1;}var positions=new Array();if(lower&&minlower>0){for(var i=0;i<minlower;i++){positions[positions.length]="L";}}if(upper&&minupper>0){for(var i=0;i<minupper;i++){positions[positions.length]="U";}}if(digits&&mindigits>0){for(var i=0;i<mindigits;i++){positions[positions.length]="D";}}if(special&&minspecial>0){for(var i=0;i<minspecial;i++){positions[positions.length]="S";}}while(positions.length<length)
View i_dont_know_why_im_sharing_this_but_whatever.js
// by: throw_away_stacy on reddit
// and yes I do birthday parties too
const WebSocket = require('websocket').w3cwebsocket;
const users = require('./users.json');
const Q = require('q');
const superagent = require('superagent');
const _ = require('highland');
const getPixels = require('get-pixels');
@brunocassol
brunocassol / redisjobqueue.go
Created Mar 11, 2017
A simple demo implementation of a Redis job queue in Go inspired on http://stackoverflow.com/a/34754632
View redisjobqueue.go
package main
// A simple demo implementation of a Redis job queue in Go inspired on http://stackoverflow.com/a/34754632
// You'll need to get redis driver package in terminal with: go get -u gopkg.in/redis.v5
// Once it is running, Redis should look like: http://i.imgur.com/P4XlwlP.png
// Terminal should look like: http://i.imgur.com/AS2IIbP.png
// I have 4 days of Go programming experience, have mercy.
import (
"fmt"
You can’t perform that action at this time.