test gist!
^ I need this to test '&' in headers
| upstream api { | |
| server hopper-api.herokuapp.com; | |
| } | |
| server { | |
| listen 80; | |
| listen 443 ssl; | |
| server_name www.schedjs.com$; | |
| ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; |
| class IndexPage | |
| constructor: (opts) -> | |
| @view = new RactiveView(el: opts.el) | |
| # Ask the router for current user, | |
| # if success, set user | |
| # if fail, redirect to login | |
| opts.router.getCurrentUser().then (user) => |
| ## e.g. Usage | |
| def V1::UserController < V1::BaseController | |
| ## In controller | |
| def show | |
| render :json => reject_unpermitted(user, V1::UserPresenter.new(user)) | |
| end | |
| def update |
| sudo apt-get install libnss3-tools | |
| certutil -d sql:.pki/nssdb -A -t "C,," -n "will-ob localhost" -i /usr/share/ca-certificates/moar/localhost.crt | |
| sudo dpkg-reconfigure ca-certificates |
| -----BEGIN CERTIFICATE REQUEST----- | |
| MIIBnzCCAQgCAQAwXzELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx | |
| ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAwwPYmV0 | |
| YS50YXBqb3kuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtuGIDiuI7 | |
| 7W4RAc0pGwi0f906ie3zzt4zbBcrS6WHXm49TmQzd+alRS8QDKONgwKPPagmKp4Z | |
| p00laKphVrhIkXr+hiEEoypRlhyMKVLGfpQZhIqiYbFYbs4weCHTRpTQXXfmnOCw | |
| ZuL1jTzIvBaONwGsc1oSnXUBu4a9sfvj9QIDAQABoAAwDQYJKoZIhvcNAQELBQAD | |
| gYEAtP/dhSOv/Fo6vVRKFiKNaqroTa6Hi//JGosm7YubX5+n4ZwVJ4bpmzcJym5n | |
| FpuMKiXpqlNGGUQ4yEkSCkP+Ab1dnS6dAGi63wjsWeAgwAbQH0xlN4ovsJNBtHRz | |
| SUUZdA9wOs5tBAyGrEr6mTuO/kVKd24i3E1dZtxeUZKOQlo= |
| #!/usr/bin/env bash | |
| OPTIND=1 # Reset getopts iterator | |
| while getopts "ht:f:" opt; do | |
| case "$opt" in | |
| h|\?) | |
| echo "h or nothing?" | |
| exit 0 | |
| ;; |
| #!/bin/bash | |
| # Inspired by Brandon Philips' consul bootstrap script | |
| # https://gist.github.com/philips/56fa3f5dae9060fbd100 | |
| source /etc/environment | |
| num_expected_nodes=$1 | |
| do_join() { |
| CREATE OR REPLACE FUNCTION update_modified_column() | |
| RETURNS TRIGGER AS $$ | |
| BEGIN | |
| NEW.updated_at = now(); | |
| RETURN NEW; | |
| END; | |
| $$ language 'plpgsql'; | |
| ALTER TABLE consumer_offsets ADD COLUMN updated_at timestamp default current_timestamp; | |
| CREATE TRIGGER update_consumer_offsets_modtime BEFORE UPDATE ON consumer_offsets FOR EACH ROW EXECUTE PROCEDURE update_modified_column(); |
| #!/usr/bin/env bash | |
| # Just for editor highlighting | |
| ### Kafka configuration | |
| version=0.8.2.1 | |
| scala_version=2.11 | |
| install_dir=/usr/local/share | |
| sudo -E su - --command "cd /tmp && wget http://archive.apache.org/dist/kafka/$version/kafka_$scala_version-$version.tgz" |