Code | Description |
---|---|
01 | White British |
02 | White Irish |
03 | White Other |
04 | White and Black Caribbean |
05 | White and Black African |
06 | White and Asian |
07 | Other Mixed Background |
08 | Asian or Asian British Indian |
View emojione-area.js
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
/*! | |
* EmojioneArea v3.4.1 | |
* https://github.com/mervick/emojionearea | |
* Copyright Andrey Izman and other contributors | |
* Released under the MIT license | |
* Date: 2018-04-27T09:03Z | |
*/ | |
window = ( typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {} ); | |
document = window.document || {}; |
View Context.js
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
/* | |
* Context.js | |
* Copyright Jacob Kelley | |
* MIT License | |
* | |
*/ | |
contextMenu = (function () { | |
var options = { |
View colpik.js
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
/* | |
colpick Color Picker | |
Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses | |
For usage and examples: colpick.com/plugin | |
*/ | |
(function ($) { | |
var colpick = function () { |
View webhook-signature.rb
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
# request_signature - the signature from the X-Dentally-Signature header | |
# request_body - the JSON body of the webhook request | |
# secret - the secret for the webhook | |
require "openssl" | |
digest = OpenSSL::Digest.new("sha256") | |
calculated_signature = OpenSSL::HMAC.hexdigest(digest, secret, request_body) | |
if calculated_signature == request_signature |
View Ethnicity-codes.md
View timeslots.sql
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
CREATE TABLE reservations ( | |
start_time timestamp not null, | |
finish_time timestamp not null, | |
id serial primary key | |
); | |
INSERT INTO reservations (start_time, finish_time) | |
VALUES ('2014-05-01 09:30:00', '2014-05-01 10:00:00'), | |
('2014-05-01 10:15:00', '2014-05-01 11:00:00'), | |
('2014-05-01 11:30:00', '2014-05-01 11:45:00'); |
View sidekiq.rb
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
Sidekiq.configure_server do |config| | |
if defined?(ActiveRecord::Base) | |
config = ActiveRecord::Base.configurations[Rails.env] | |
config["reaping_frequency"] = ENV["DB_REAP_FREQ"] || 10 # seconds | |
config["pool"] = ENV["SIDEKIQ_DB_POOL"] || 20 | |
ActiveRecord::Base.establish_connection(config) | |
end | |
end |
View Rakefile
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
tasks = Rake.application.instance_variable_get '@tasks' | |
tasks.delete 'db:structure:dump' | |
namespace 'db' do | |
namespace 'structure' do | |
task :dump => [:environment, :load_config] do | |
configuration = ActiveRecord::Tasks::DatabaseTasks.current_config | |
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql") | |
ENV['PGHOST'] = configuration['host'] if configuration['host'] | |
ENV['PGPORT'] = configuration['port'].to_s if configuration['port'] | |
ENV['PGPASSWORD'] = configuration['password'].to_s if configuration['password'] |
View gist:6697403
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
sudo -u postgres sed "$id s/$5433/$5432/" -i /etc/postgresql/9.3/main/postgresql.conf | |
sudo -u postgres /etc/init.d/postgresql restart | |
sudo -u postgres createuser ubuntu -s | |
sudo -u postgres createdb circle_test -O ubuntu |
View gist:5483481
WAL-E needs to be installed on all machines, masters and slaves.
Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf
is:
archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
NewerOlder