Skip to content

Instantly share code, notes, and snippets.

Rodrigo Alviani rodrigoalviani

Block or report user

Report or block rodrigoalviani

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
rodrigoalviani / plate-snitch.js
Created Aug 29, 2017 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
View plate-snitch.js
// Open form and submit enquire for `rego`
function getInfo(rego) {
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.then(function(body) {
rodrigoalviani / watermarkImage().js
Created Jun 12, 2017 — forked from westc/watermarkImage().js
Add a watermark text to the bottom right of any image element on the page that is on the same domain.
View watermarkImage().js
function watermarkImage(elemImage, text) {
// Create test image to get proper dimensions of the image.
var testImage = new Image();
testImage.onload = function() {
var h = testImage.height, w = testImage.width, img = new Image();
// Once the image with the SVG of the watermark is loaded...
img.onload = function() {
// Make canvas with image and watermark
var canvas = Object.assign(document.createElement('canvas'), {width: w, height: h});
var ctx = canvas.getContext('2d');
rodrigoalviani / webspider.hs
Created Jan 5, 2016 — forked from shangaslammi/webspider.hs
Haskell Web Spider example
View webspider.hs
import Control.Exception
import Control.Monad
import Control.Monad.IO.Class
import Data.ByteString.Lazy (ByteString)
import Data.ByteString.Lazy.UTF8 (toString)
import Data.Function
import Data.Enumerator
import Data.List
import Data.Maybe
View crawler haskell
-- | URL Doc :
module Page where
import Network.URL
import Network.Curl
import Text.XML.HXT.Core
import Text.HandsomeSoup
data Page = Page {
title :: String,
rodrigoalviani / tor_curl.php
Created Nov 17, 2015 — forked from zachflower/tor_curl.php
How To Anonymize PHP cURL Requests Using Tor
View tor_curl.php
$ip = '';
$port = '9051';
$auth = 'PASSWORD';
$command = 'signal NEWNYM';
$fp = fsockopen($ip,$port,$error_number,$err_string,10);
if(!$fp) { echo "ERROR: $error_number : $err_string";
return false;
You can’t perform that action at this time.