The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
Country.create([{name: "Afghanistan",alpha: "AFG",code: "004"},{name: "Åland Islands",alpha: "ALA",code: "248"},{name: "Albania",alpha: "ALB",code: "008"},{name: "Algeria",alpha: "DZA",code: "012"},{name: "American Samoa",alpha: "ASM",code: "016"},{name: "Andorra",alpha: "AND",code: "020"},{name: "Angola",alpha: "AGO",code: "024"},{name: "Anguilla",alpha: "AIA",code: "660"},{name: "Antarctica",alpha: "ATA",code: "010"},{name: "Antigua and Barbuda",alpha: "ATG",code: "028"},{name: "Argentina",alpha: "ARG",code: "032"},{name: "Armenia",alpha: "ARM",code: "051"},{name: "Aruba",alpha: "ABW",code: "533"},{name: "Australia",alpha: "AUS",code: "036"},{name: "Austria",alpha: "AUT",code: "040"},{name: "Azerbaijan",alpha: "AZE",code: "031"},{name: "Bahamas",alpha: "BHS",code: "044"},{name: "Bahrain",alpha: "BHR",code: "048"},{name: "Bangladesh",alpha: "BGD",code: "050"},{name: "Barbados",alpha: "BRB",code: "052"},{name: "Belarus",alpha: "BLR",code: "112"},{name: "Belgium",alpha: "BEL",code: "056"},{name: "Belize",alpha |
# Fixing permissions of packaged gems | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh": | |
content: | | |
#!/usr/bin/env bash | |
# . /opt/elasticbeanstalk/containerfiles/envvars | |
. /opt/elasticbeanstalk/support/envvars | |
CACHE_GEM_DIR=$EB_CONFIG_APP_ONDECK/vendor/cache |
require 'net/http' | |
require 'uri' | |
uri = URI.parse('http://www.test.com/index.php') | |
http = Net::HTTP.new(uri.host, uri.port) | |
hex = (('a'..'f').to_a + ('0'..'9').to_a).sort.map { |x| x.ord } | |
ascii = (32..127).to_a | |
tables = '' |
http://www.transantiago.cl/restservice/rest/getpuntoparada?lat=-33.6089714&lon=-70.5742975&bip=1
http://www.transantiago.cl/predictor/prediccion?codsimt=PA420&codser=504
(código de servicio es opcional, pero el parámetro debe estar presente aunque esté vacío)
http://www.transantiago.cl/restservice/rest/getservicios/all
brew install openssl | |
brew link --force openssl | |
gem install puma | |
ALternatively: | |
export CPPFLAGS="-I/usr/local/opt/openssl/include" | |
export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
gem install puma |
You can add some special notes to your source code comments in Rails to remind you later of stuff you need to do:
class Article < ActiveRecord::Base
# TODO add named_scopes
# FIXME method A is broken
# OPTIMIZE improve the code
has_many :comments
....
end
# 1) Create your private key | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048 | |
# 2) Generate RSA key | |
$ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key | |
# 3) Get rid of private key | |
$ rm lvh.me.pass.key |
require 'spec_helper' | |
# This spec was generated by rspec-rails when you ran the scaffold generator. | |
# It demonstrates how one might use RSpec to specify the controller code that | |
# was generated by Rails when you ran the scaffold generator. | |
# | |
# It assumes that the implementation code is generated by the rails scaffold | |
# generator. If you are using any extension libraries to generate different | |
# controller code, this generated spec may or may not pass. | |
# |