This file contains hidden or 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
| # Liquid tag for rendering Rouge CSS | |
| # | |
| # Usage: | |
| # {% rouge_css <theme> [mode] %} | |
| # | |
| # Examples: | |
| # {% rouge_css github %} | |
| # {% rouge_css base16 light %} | |
| class RougeCss < Liquid::Tag | |
| def initialize(tag_name, args, tokens) |
This file contains hidden or 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
| #! /bin/bash | |
| CONSUL_ENV_CMD=$(cat <<EOF | |
| bundle exec cmdb shim --env \ | |
| --user www-data \ | |
| --consul-url=http://consul:8500 \ | |
| --consul-prefix ${RS_DEPLOYMENT_UNIT}/library \ | |
| --consul-prefix ${RS_DEPLOYMENT_UNIT}/common | |
| EOF |
This file contains hidden or 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
| ask(:newrelic_license_key, '') | |
| desc 'Install newrelic-sysmond' | |
| task :install_newrelic_sysmond do | |
| on roles(:all) do | |
| unless test("command -v nrsysmond-config >/dev/null 2>&1") | |
| execute 'echo deb http://apt.newrelic.com/debian/ newrelic non-free | sudo tee /etc/apt/sources.list.d/newrelic.list' | |
| execute 'curl --silent https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -' | |
| sudo 'apt-get update' | |
| sudo 'DEBIAN_FRONTEND=noninteractive apt-get install -y newrelic-sysmond' |
This file contains hidden or 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
| # No good. Configuration options are bound to environment names | |
| if ENV['RAILS_ENV'] == 'production' || ENV['RAILS_ENV'] =~ /integ|stage/ | |
| logger = RightSupport::Log::SystemLogger.new('my_service') | |
| else | |
| logger = Logger.new(STDOUT) | |
| end |
This file contains hidden or 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
| ask :bitbucket_username, nil | |
| ask :bitbucket_password, nil | |
| set :bitbucket_deploy_key_path, '/home/ubuntu/.ssh/id_rsa.pub' | |
| set :bitbucket_deploy_key_label, 'capistrano-bitbucket' | |
| desc 'Generate SSH key pair' | |
| task :generate_ssh_keys do | |
| on roles(:all) do | |
| execute '[ -f ~/.ssh/id_rsa ] || ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""' | |
| end |
This file contains hidden or 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 'pry' | |
| class MagicBullshit | |
| def self.inherited(subclass) | |
| subclass.prepare | |
| end | |
| def self.prepare | |
| @words = {} | |
| end |
This file contains hidden or 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
| -----BEGIN CERTIFICATE----- | |
| MIIDLjCCAhagAwIBAgIBAjANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJVUzET | |
| MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FudGEgQmFyYmFyYTETMBEG | |
| A1UECgwKUmlnaHRTY2FsZTESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTE1MDUyMTIx | |
| MzUzOFoXDTE3MDUyMDIxMzUzOFowHzEdMBsGA1UEAwwUbG9naW4ucmlnaHRzY2Fs | |
| ZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDlyxaiBz4DyCgF | |
| VlFZAJ+5B+T30EihdVDMACxpRqHa7CmZq275R59/J+Kqve+pApF74bNYmB34RBPf | |
| 3agVsX5j7M4naU6SlLDKLgohCamR4kETBj1Df2wMp68AzOuBRauesjl78LN/hWPM | |
| b757bz5cSYYirSXOixDJVBZqiCyc6ueDZXFKv9RKRgubvq/fNFY7bb0Ia7LC4qWI | |
| hNBf3PlNipG0Vtyi11Aq4lihBCp4Jm8YKOvtBdjiaGOmhPIPwcBnQVZ6i8APR7Ip |
This file contains hidden or 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
| module Octopress | |
| module Hooks | |
| class Site < Jekyll::Plugin | |
| def self.inherited(subclass) | |
| i = subclass.new | |
| if i.respond_to? :reset | |
| # now it's called after_reset | |
| Jekyll::Hooks.register :site, :after_reset, &i.method(:reset) | |
| end |
This file contains hidden or 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
| # Package generated configuration file | |
| # See the sshd_config(5) manpage for details | |
| # What ports, IPs and protocols we listen for | |
| Port 22 | |
| # Use these options to restrict which interfaces/protocols sshd will bind to | |
| #ListenAddress :: | |
| #ListenAddress 0.0.0.0 | |
| Protocol 2 | |
| # HostKeys for protocol version 2 |
This file contains hidden or 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
| /** | |
| * OSSUARY: Your Backbone's final RESTing place | |
| */ | |
| /** | |
| * create an Ossuary | |
| * | |
| * An Ossuary is for backbone collection management. You can add as many | |
| * backbone collections as you'd like to an Ossuary. An Ossuary provides one | |
| * simple interface for accessing data whether or not it has already been |