Skip to content

Instantly share code, notes, and snippets.

View brutuscat's full-sized avatar

Mauro Asprea brutuscat

View GitHub Profile
@brutuscat
brutuscat / README
Last active October 26, 2022 06:22
Anonymous Rotating Proxies with Monit, Tor, Haproxy and Delegated. Idea by http://blog.databigbang.com/running-your-own-anonymous-rotating-proxies/
0 - Read http://blog.databigbang.com/running-your-own-anonymous-rotating-proxies/
1 - Install monit, haproxy, tor and delegated.
2 - Setup your environment in the setup.rb file
3 - Just run > ruby setup.rb
4 - ...........
5 - PROFIT! > http://www.southparkstudios.com/clips/151040/the-underpants-business
@brutuscat
brutuscat / index.html
Last active September 29, 2022 17:00 — forked from bellbind/index.html
[chrome][android] BarcodeDetector example
<!doctype html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.9.11/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@undecaf/barcode-detector-polyfill@0.9.13/dist/index.js"></script>
<script>
try {
window['BarcodeDetector'].getSupportedFormats()
} catch {
window['BarcodeDetector'] = barcodeDetectorPolyfill.BarcodeDetectorPolyfill
@brutuscat
brutuscat / index.json.haml
Created February 14, 2012 09:59
Rails HAML Json render
:plain
[
- @movies.each do |movie|
:plain
{
"name":"#{movie.name}",
"description":"#{j(movie.description)}"
},
]
$(document).ready(function() {
$('#toc ~ #content-text > div > h1').removeAttr('class');
$('#toc ~ #content-text > div > h1 > span').removeAttr('class');
$('#toc ~ #content-text > div > h2').removeAttr('class');
$('#toc ~ #content-text > div > h2 > span').removeAttr('class');
$('#toc .h3, #toc .h4, #toc .h5, #toc .h6').remove();
$('#toc .h1 > span, #toc .h2 > span').removeAttr('class');
$('#toc ~ #content-text > table').prev().remove();
var startsWithEnglish = /^English/;
$('table tr:nth-child(1) td:nth-child(1):contains("English")')
@brutuscat
brutuscat / deploy.rb
Created February 21, 2012 15:36
Simple Sunspot Solr Capistrano Tasks
# Simple Start and Stop tasks for your Solr server.
# 1 - Download your Solr from http://www.apache.org/dyn/closer.cgi/lucene/solr/ and extract it somewhere
# 2 - Set the :solr_path with the full path to the Solr "example" dir
#
# NOTES:
# - sunspot_solr gem must be in your Gemfile
# - It will run the "example" Jetty-embed Solr server (start.jar)
# - It will automatically pick your project Solr config from your "project_path/solr" with the Sunspot schema and files.

Keybase proof

I hereby claim:

  • I am brutuscat on github.
  • I am brutuscat (https://keybase.io/brutuscat) on keybase.
  • I have a public key ASDgS_cyBl4v6dvm6-XtcW9EZRvq76RceFsQbbyUYF9ZjAo

To claim this, I am signing this object:

@brutuscat
brutuscat / wget.limited.scapper
Created October 4, 2011 09:09
wget command to scrap just a portion of a website's HTML
# This way you can test your scripts in your localhost. It's like using the
# --mirror option without downloading all the needed resources, just the HTML.
# Add "-e robots=off" to be evil
# Add --continue so wget won't download already downloaded files
wget -r -N -E --convert-links --random-wait -l 3 --wait=2 --user-agent=" Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.1) Gecko/20100101 Firefox/6.0.12011-09-09 13:03:08" "URL-WEBSITE?and=1&params=2"
@brutuscat
brutuscat / 1 - Calendario Laboral de España.md
Last active January 2, 2016 01:09
[Festivos 2014] Calendario Laboral de España

[2014] Calendario Laboral de España

El calendario laboral de 2014 recoge un total de nueve fiestas nacionales comunes a todas las comunidades autónomas, según se aprobó en Noviembre del 2013 por la Dirección General de Empleo.

En total, en España suele haber diez festivos nacionales, dos de las comunidades autónomas y dos fiestas locales.

En concreto, las nueve fiestas nacionales son el 1 de enero (Año Nuevo), el 6 de enero (Epifanía del Señor), el 18 de abril (Viernes Santo), el 1 de mayo (Fiesta del Trabajo), el 15 de agosto (Asunción de la Virgen), el 1 de noviembre (Día de Todos los Santos), el 6 de diciembre (Día de la Constitución española), el 8 de diciembre (La Inmaculada Concepción) y el 25 de diciembre (Natividad del Señor).

@brutuscat
brutuscat / README.md
Last active January 1, 2016 22:19
[SOLVED] How to solve Maverick's beach ball of death recurrent issues?

Solving OSX Maverick's beach ball of death issues

  • Make sure you re-enable Trim support in your SSD
  • Disable memory compression mechanisms:
sudo nvram boot-args="vm_compressor=1"
@brutuscat
brutuscat / README.md
Last active January 1, 2016 15:19
Instructions and patch to compile MAME 0.151 in OSX using Homebrew