Skip to content

Instantly share code, notes, and snippets.

View unRob's full-sized avatar
馃檭

Roberto Hidalgo unRob

馃檭
View GitHub Profile
{
"1" : [
"16: Preciso Me Encontrar /// Cartola",
"12: Com A莽煤car, Com Afeto /// Fernanda Takai",
"9: Para Qu茅 Sufrir /// Natalia Lafourcade",
"9: Canto das Tr锚s Ra莽as /// Clara Nunes",
"8: Lo Que Construimos /// Natalia Lafourcade"
],
"2" : [
"19: Kathy's Waltz /// The Dave Brubeck Quartet",
@unRob
unRob / README.html
Last active January 20, 2016 02:45
Full Window Youtube
Run the youtube player full-window mode by adding this bookmarlet
<a href='javascript:(function(){var c,b,a=document.body.classList;if(a.contains("fsyoutube-available")){a.toggle("fsyoutube")}else{var d=document.createElement("style");document.head.appendChild(d);b=d.sheet;c=[".fsyoutube #masthead-positioner{display:none;}",".fsyoutube #movie_player{position:fixed;width:100%;height:100%;top:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;}",".fsyoutube video{margin:0 auto;position:relative!important;top:auto!important;left:auto!important;width:auto!important;height:auto!important;max-width:100%!important;min-width:100%!important;}",".ytp-chrome-bottom{width:98%!important;}"];c.forEach(function(e){b.insertRule(e)});a.add("fsyoutube-available");a.add("fsyoutube")}})();)'>FWYT</a>
@unRob
unRob / index.html
Last active March 31, 2020 21:20
Safari vs `video.source = Blob`
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>Safari VS `video.source = Blob`</title>
</head>
<body>
<button id="button">Select a video file</button>
@unRob
unRob / twitter-followers.js
Last active April 27, 2016 17:17
馃懟 of twitter present
/*
1. Entra a https://twitter.com/followers
2. Haz scroll hasta que se carguen todos tus followers
3. Corre el c贸digo de all谩 abajo en la consola de tu navegador
4. ???
5. PROFIT!!1!
*/
(function(){
var followers = document.querySelectorAll('.js-actionable-user .u-linkComplex-target'), for_realz = followers.length,
for_lulz = parseInt(document.querySelector('.ProfileNav-item--followers .ProfileNav-value').innerText, 10);
@unRob
unRob / infomex.org.mx.json
Last active August 29, 2015 14:16
Campos de formulario de nueva petici贸n a InfoMex (federal)
{
"struts.token.name": {
"type": "input",
"value": "token"
},
"token": {
"type": "input",
"value": "un token"
},
"cboTipoSolicitud": {
@unRob
unRob / LICENSE.md
Last active April 27, 2016 17:17
Licencia Patito

LICENCIA PATITO

Versi贸n 0.0.1; Septiembre, 2014

Copyright (c) [a帽o], [titular de derechos de autor]

Todos los derechos reservados.

La redistribuci贸n y uso como c贸digo fuente y/u objeto, con o sin modificaciones, est谩 permitida siempre y cuando todas las siguientes condiciones sean respetadas:

  • La redistribuci贸n del c贸digo fuente debe mantener la nota de copyright antes mencionada, esta lista de condiciones y la renuncia de responsabilidades que acompa帽a esta licencia.
@unRob
unRob / explore.rb
Last active August 29, 2015 14:06
WiFi P煤blico (M茅xico)
# encoding: utf-8
require 'sinatra'
require 'mongo'
require 'json'
$mongo = Mongo::MongoClient.new
$db = $mongo['wifi']
@unRob
unRob / Desburocratiza-jquery.js
Created September 11, 2014 08:58
SI TE CAGA QUE ESCRIBAN AS脥, este plugin es pa ti
String.prototype.toTitleCase = function(){
// Usar铆a Array.prototype.map, pero ie :/
return jQuery.map(this.toLocaleLowerCase().split(/\s/), function(word){
return word[0].toLocaleUpperCase()+word.slice(1);
}).join(' ');
};
(function(){
var callback = function(hardcore){
@unRob
unRob / post-merge.sh
Created July 21, 2014 07:05
Rails post-pull
#!/usr/bin/env bash
# Checa si cambiaron (Gemfile|.e?rb|css|js) y reinicia/compila/instala madres
# gu谩rdame como .git/hooks/post-merge
HOOKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
GITDIR="$(dirname $HOOKDIR)"
REPODIR="$(dirname $GITDIR)"
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
# changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD HEAD^)"
@unRob
unRob / iconiza.rb
Last active February 2, 2016 01:38
Convierte una imagen en un archivo .icns
#!/usr/bin/env ruby
# encoding: utf-8
src = ARGV[0]
if src == ''
puts "Usage: ./iconiza take five.jpg"
puts "Convierte una imagen en un archivo .icns"
end