Skip to content

Instantly share code, notes, and snippets.

View gustin's full-sized avatar
🦁
Happy

gustin gustin

🦁
Happy
View GitHub Profile
<label>
<span>País</span>
<select class="select-styled" id="member_info_country_iso" name="country_iso" required="required">
<option data-uses-postcode="false" value="af">Afghanistan</option>
<option data-uses-postcode="false" value="al">Albania</option>
<option data-uses-postcode="true" value="dz">Algeria</option>
<option data-uses-postcode="true" value="as">American Samoa</option>
<option data-uses-postcode="true" value="ad">Andorra</option>
<option data-uses-postcode="false" value="ao">Angola</option>
<option data-uses-postcode="false" value="ai">Anguilla</option>
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*
@gustin
gustin / gist:369eae3779522cd4e46a
Last active August 29, 2015 14:08
Locale Config
new Purpose({
account: 'oxfam',
url: 'http://oxfam.api.movements.purpose.com',
locale: 'es' // can be retrieved from cookie, or page url, or added by affiliate CMS, or anywhere really
}).attach();
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
@gustin
gustin / application.js
Last active August 29, 2015 14:07
Oxfam Action Block
var purpose = new Purpose({
account: "oxfam",
url: "http://oxfam.api.staging.purpose.com/en"
});
purpose.attach();
module MyApp
module Database
def connect(pool_size = nil, reap_time = nil)
return unless defined? ActiveRecord::Base
config = Rails.application.config.database_configuration[Rails.env]
config['reaping_frequency'] = reap_time || ENV['AR_DB_REAP_FREQ'] || 10 # seconds
config['pool'] = pool_size || ENV['AR_DB_POOL'] || 5
ActiveRecord::Base.establish_connection(config)
end
launchers:
integration:
command: "rspec testing/integration"
headless:
command: "HEADLESS=1 rspec testing/integration"
src_files:
- testing/integration/*.rb
- app/webroot/js/src/global.js
test_page: app/webroot/js/SpecRunner.html
launch_in_dev:
In 2008 WHO malnutrition expert Francesco Branca cited the lack (in 2008) of
real-world studies and uncertainty about how many people will use golden rice,
concluding "giving out supplements, fortifying existing foods with vitamin A,
and teaching people to grow carrots or certain leafy vegetables are, for now,
more promising ways to fight the problem".[41]
@gustin
gustin / 0_reuse_code.js
Created January 20, 2014 03:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gustin
gustin / flume-conf.properies
Last active December 28, 2015 08:08
Flume Configuration
agent.channels = file-channel
agent.sources = rabbitmq-source
agent.sinks = hdfs-sink hbase-sink
agent.channels.file-channel.type = file
agent.channels.file-channel.checkpointDir = /etc/flume/data/checkpoint
agent.channels.file-channel.dataDirs = /etc/flume/data
agent.sources.rabbitmq-source.channels = file-channel
agent.sources.rabbitmq-source.type = org.apache.flume.source.rabbitmq.RabbitMQSource