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
has_attached_file :file, | |
styles: { | |
detail: { | |
geometry: "__width__x__height__#", | |
watermark_path: Rails.root.join("app/assets/images/__watermark_image__.png"), | |
position: 'Center' # SouthEast, NorthWest, etc | |
} | |
}, processors: [:watermark] |
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
#encoding: utf-8 | |
require 'sinatra' | |
require 'twitter' | |
require 'flickraw' | |
require 'yaml' #for debugging purposes | |
FlickRaw.api_key = "" | |
FlickRaw.shared_secret = "" | |
client = Twitter::REST::Client.new do |config| |
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
1) Lambdas vs. Closures | |
@lucas_giudice | |
2) Algo | |
@tonchis_ | |
3) Jump to Code | |
@KevinJHanna | |
4) Apprenticeship" |
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
Para recategorizarte en el Monotributo, la aplicación de AFIP da error de Javascript por todos lados. | |
A menos que entres con Internet Explorer... | |
Para hacer el trámite en Chrome, Firefox o cualquier browser decente: | |
- Entrá con tu clave fiscal | |
- Abrí la aplicación de "Monotributo" | |
- Ignorá el formulario y abrí la siguiente URL: | |
https://servicios1.afip.gov.ar/tramites_con_clave_fiscal/monotributo/valida_cuit.asp?tramite=3&cuit=___TU_CUIT___&intesoc=N&eventual=N&coop=N&cuitcoop=0 |
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/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
require 'flickraw' | |
require 'airplay' | |
FlickRaw.api_key = 'API_KEY' | |
FlickRaw.shared_secret = 'API_SECRET' | |
atv = Airplay.devices.first | |
results = flickr.photos.search(:tags => ARGV[0]) | |
for x in 1..results.length do |
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 Avatar < ActiveRecord::Base | |
attr_accessor :content_type, :original_filename, :image_data | |
before_save :decode_base64_image | |
has_attached_file :image, | |
PAPERCLIP_CONFIG.merge( | |
:styles => { | |
:thumb => '32x32#', | |
:medium => '64x64#', |
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
javascript: document.getElementById("rightCol").style.display="none"; document.getElementById("contentArea").style.width="755px"; return false; | |
/* | |
#rightCol -> hide(); | |
#contentArea -> width:755px | |
*/ |
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
# USAGE: | |
#require RAILS_ROOT + "/lib/" + "mysqldump.rb" | |
#dump = Mysqldump.full_backup | |
#response.headers['Content-Type'] = 'text/plain' | |
#response.headers['Content-Disposition'] = 'attachment; filename=DATABASE_' + Date.today.to_s + '.bak' | |
#render :text => dump | |
class Mysqldump |
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
// Styles needed to fix layout | |
.pp{ margin-left: 0px !important; margin-right:0px !important;} | |
.q0CeU{ margin-right:0px !important} | |
// Execute this in the inspector window or the address bar, or bookmark it if you can | |
javascript:i=document.getElementById("canvas_frame").contentWindow.document;j=i.getElementsByClassName("T0 pp");for(k=0;k<j.length;k++)if(j.item(k).getElementsByClassName("pw").item(0).innerHTML=="Chat")j.item(k).style.margin='0';i.getElementsByClassName("nH q0CeU z").item(0).style.marginRight='0';void 0 |
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
@operadores = User.find(:all, :conditions => | |
{ :id => | |
EventoTrabajosUser.find(:all, :conditions => | |
{ :evento_trabajo_id => | |
EventoTrabajo.find(:all, :conditions => | |
{ :evento_id => @planificacion.eventos.collect{ |b| b.id } } | |
).collect { |c| c.id } | |
}).collect { |d| d.user_id } | |
}) |