This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# Saves files in dropbox, at ~/Dropbox/SharedFolder/Invoices/YYYY/MM/Rackspace #{invoice-no}.pdf | |
require 'httparty' | |
require 'open-uri' | |
require 'json' | |
require 'dropbox_sdk' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'csv' | |
meses = 1..12 | |
valores = [0]*12 | |
data = Hash[meses.zip valores] | |
dpm = Hash[meses.zip valores] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoquete | |
sagaz | |
inconsistente |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby \ | |
-e "$(curl https://gist.githubusercontent.com/unRob/0a76d3dad38812a82a16/raw/484aaba23e0e312f57e6f82d40c52b76d332cc20/validatimbre)" \ | |
cfdi.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function t(n,e,o){function r(a){if(!e[a]){var i=e[a]={exports:{}};n[a][0].call(i.exports,function(t){var e=n[a][1][t];return r(e?e:t)},i,i.exports,t,n,e,o)}return e[a].exports}for(var a=0;a<o.length;a++)r(o[a]);return r}({D5DuLP:[function(t,n){function e(t,n){var e=o[t];return e?e.apply(this,n):(r[t]||(r[t]=[]),void r[t].push(n))}var o={},r={};n.exports=e,e.queues=r,e.handlers=o},{}],handle:[function(t,n){n.exports=t("D5DuLP")},{}],G9z0Bl:[function(t,n){function e(){var t=d.info=NREUM.info;if(t&&t.agent&&t.licenseKey&&t.applicationID){d.proto="https"===c.split(":")[0]||t.sslForHttp?"https://":"http://",i("mark",["onload",a()]);var n=u.createElement("script");n.src=d.proto+t.agent,u.body.appendChild(n)}}function o(){"complete"===u.readyState&&r()}function r(){i("mark",["domContent",a()])}function a(){return(new Date).getTime()}var i=t("handle"),s=window,u=s.document,p="addEventListener",l="attachEvent",c=(""+location).split("?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# Uso: gifeameesta [options] input final.gif | |
# -h, --help Cómo usar este programa | |
# -s, --size pixels Redimensionar imagen a `pixels` pixeles máximo | |
# -d, --delay seconds Delay entre cada imagen, por default: .5s | |
require 'RMagick' | |
require 'optparse' | |
include Magick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String | |
# un cache | |
@@traducidas = {} | |
# salvo que sean la primera palabra, estas no se deben capitalizar | |
def ignora? word | |
['del', 'de', 'las', 'los', 'el', 'la', 'o', 'y', 'e'].include? word | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MEGA 3133T H4X0R */ | |
var to = null; | |
var twitterReady = function(){ | |
if (window.frames.length < 2) { | |
return false; | |
} | |
clearInterval(to); | |
to = null; | |
s = window.frames[0].document.createElement('style'); | |
console.log('ready'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//para el request /mira/un/salmón?color=verde | |
$segmentos = split("/", $_SERVER['PATH_INFO']); | |
//['mira', 'un', 'salmón'] | |
// o algo por el estilo... | |
$args = array_slice($segmentos, 2, count($segmentos)-2); | |
$controller = new $segmentos[0]; //new Mira |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>mx.rob.photostream</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/ruby</string> | |
<string>/Users/rob/photostream.rb</string> |