Skip to content

Instantly share code, notes, and snippets.

Ramiro Gómez yaph

Block or report user

Report or block yaph

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
yaph /
Created Nov 1, 2016 — forked from tristandostaler/
How to install correctly python Selenium (tested on ubuntu gnome)
apt-get install ipython
apt-get install python-pip
pip install selenium
mkdir /root/bin
cd /root/bin
tar -xvzf geckodriver-v0.9.0-linux64.tar.gz
rm geckodriver-v0.9.0-linux64.tar.gz
chmod +x geckodriver
cp geckodriver wires
yaph /
Last active Aug 29, 2015
Update distribute and all Python virtualenvs in current directory
sudo easy_install -U distribute
find . -type d -maxdepth 1 -exec virtualenv {} \;
yaph / vat-reverse
Created Apr 10, 2014
Calculate initial amount from final amount for VAT calculation
View vat-reverse
no_vat = final_amount * 100 / 119
yaph /
Created Apr 9, 2014
Trying to get a Brother DCP-135C to work on Ubuntu 13.10
sudo apt-get purge brother-lpr-drivers-extra
sudo apt-get autoremove
sudo dpkg -i dcp135clpr-1.0.1-1.i386.deb
sudo mkdir ls /var/spool/lpd
sudo dpkg -i dcp135ccupswrapper-1.0.1-1.i386.deb
yaph /
Last active Aug 29, 2015 — forked from mbostock/.block
Fork of mbostock's coastal counties map

This map shows the graph distance of each county from the Pacific or Atlantic coast; it is a recreation of a map posted to /r/dataisbeautiful using TopoJSON. Coastal counties are dark blue, while counties nine or more counties away from the coast are light yellow. (I opted not to reuse the original’s cycling color scale.)

See also the underlying graph.

yaph /
Created Jan 22, 2014
Basic arachni usage commands
# scan up to 1000 URLs
arachni --link-count=1000 --report=afr:outfile=domain.tld.html http://domain.tld
# convert existing afr report to html
arachni --repload=domain.tld.afr --report=html:outfile=domain.tld.html
yaph /
Last active Dec 30, 2015
DBpedia/Wikipedia CSV manipulation
# DBpedia table
csvcut -c 2 Film.csv | sed -e 's/(.*)$//' > film-titles.txt
# wikitables CSV
csvcut -c 1 List_of_Academy_Award-winning_films.csv | sed -e 's/(.*)//' | sed -e 's/\"//g' > film-titles.txt
# fix names
sed -e 's/|.*}//g' -e 's/{//' -i datasets/populated-places-locations.csv
yaph / ula2json.js
Created Oct 24, 2013
Convert an HTML ul list of links to a JSON list of objects with href and text content.
View ula2json.js
var list = [];
$('ul a').each(function(idx, item){
href: $(item).attr('href'),
text: item.textContent
JSON.stringify(list, null, " ");
yaph /
Created Aug 27, 2013
More effective grepping through Python projects code
grep --exclude=*.{pyo,pyc,txt} -r STRING
yaph /
Last active Dec 21, 2015
monitor server connections
# count port 80 connections
netstat -alpen | grep -c :80
# watch connections, refresh every 5 seconds
sudo watch -n5 -d 'netstat -alpen | grep -c :'
You can’t perform that action at this time.