xcode-select --install
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
irb(main):001:0> @amigo = "Juan" | |
=> "Juan" | |
irb(main):002:0> "Hola #@amigo" | |
=> "Hola Juan" |
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 | |
require 'open-uri' | |
require 'json' | |
FROM = 'USD' | |
TO = 'PEN' | |
URL = "http://rate-exchange.appspot.com/currency?from=#{ FROM }&to=#{ TO }" | |
open URL do |rates_file| |
Todas tus preguntas son bienvenidas :) sin embargo te brindamos algunas indicaciones para ofrecerte una mejor ayuda:
Primero busca el motivo de tu consulta en Internet. Por ejemplo, si tienes un mensaje de error utiliza un buscador para ver si ya existe una solución.
Cuando entres al chat saluda a los presentes antes de hacer tu pregunta, un simple “hola” es suficiente.
- Habla
- Nonnes
- Cañones
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
# Gemfile | |
gem "puma" | |
# Procfile | |
web: bundle exec puma -p $PORT -e $RACK_ENV -C config/puma.rb | |
# add to config block config/environments/production.rb | |
config.threadsafe! | |
# get rid of NewRelic after_fork code, if you were doing this: |
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
→ dig facebook.com | |
; <<>> DiG 9.8.3-P1 <<>> facebook.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14620 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;facebook.com. IN A |
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
# override Kernel#require to intercept stderr messages on require | |
# and raise a custom error if we find one mentioning 'iconv' | |
require "stringio" | |
class RequireError < StandardError | |
end | |
module Kernel | |
alias :the_original_require require |
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 'webrick' | |
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes | |
mime_types.store 'svg', 'image/svg+xml' |
NewerOlder