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
cottage | |
roquefort | |
gorgonzola | |
de cabra | |
provolone | |
mozzarella | |
muenster | |
gruyère | |
gouda | |
cheddar |
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
http://crshd.heroku.com/posts/heroku_and_gridfs | |
http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request |
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
var geocoder = new google.maps.Geocoder() | |
$("#tour_address").autocomplete({ | |
minLength: 3, | |
source: function(input, callback){ | |
try{ | |
var results = geocoder.geocode({address: input.term}, function(results, status){ | |
if(status == google.maps.GeocoderStatus.OK){ | |
callback(_(results).pluck('formatted_address')) | |
} else { |
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
<h1>Mi almuerzo</h1> | |
<ul> | |
<% ['pollo', 'arroz', 'pan integral'].each do |alimento| %> | |
<li>Me gusta comer <%= alimento %></li> | |
<% end %> | |
</ul> |
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
require 'uri' | |
require 'net/http' | |
require 'json' | |
host = "http://httparty.herokuapp.com" | |
#let's store the cookie here | |
cookie = "" | |
#let's read some quotes |
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
require 'net/http' | |
require 'uri' | |
require 'json' | |
def get(url, opts) | |
opts ||= {} | |
uri = URI(url) | |
req = Net::HTTP::Get.new(uri.request_uri) | |
if opts[:headers] | |
opts[:headers].each do |header, value| |
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
require 'date' | |
class Date | |
def week_range | |
(self - self.wday .. self + (7 - self.wday) ) | |
end | |
end | |
class Planner | |
#constructor | |
def initialize |
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
prueba = %w(ruby es divertido) | |
def longitudes arr | |
arr.map(&:length) | |
end | |
puts longitudes(prueba) |
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
#la solución | |
def es_palindromo?(str) | |
return str == str.reverse | |
end | |
#pruebas | |
pruebas = ["anita lava la tina", "fantasma escritor"] | |
pruebas.each do |prueba| |
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
export SSHPASS=your-password-here | |
sshpass -e sftp -oBatchMode=no -b - sftp-user@remote-host << ! | |
cd incoming | |
put $1 | |
bye | |
! |