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
adns | |
ant | |
apr | |
apr-util | |
argtable | |
asciinema | |
autoconf | |
automake | |
autossh | |
awscli |
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
namespace :maintenance do | |
desc "Turn on maintenance mode" | |
task :enable do | |
require 'erb' | |
require 'i18n' | |
# Set up i18n (if app config changes, this will need separate updating) | |
I18n.load_path = Dir.glob(File.join(Dir.pwd, 'config', 'locales', '**', '*.yml')) | |
reason = ENV['REASON'] |
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
// depends on js-cookie.js: https://github.com/js-cookie/js-cookie | |
// | |
$(function(){ | |
var user_logged_in = function() { | |
if(Cookies.get('auth_type')) { | |
console.log('user is logged in'); | |
$(".menu-item > a[href|='/login']").replaceWith('<a title="Main Site" href="/">Main Site</a>'); | |
$(".menu-item > a[href|='/signup']").hide(); | |
} else { | |
console.log('user is _not_ logged in'); |
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
class AddLoginPreferenceToCustomers < ActiveRecord::Migration | |
def up | |
execute <<-SQL | |
CREATE TYPE loginpreference AS ENUM ('lz', 'clever'); | |
SQL | |
add_column :customers, :loginpreference, :loginpreference, index: true | |
end | |
def down |
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
class AddLoginPreferenceToCustomers < ActiveRecord::Migration | |
def up | |
execute <<-SQL | |
CREATE TYPE loginpreference AS ENUM ('lz', 'clever'); | |
SQL | |
add_column :customers, :loginpreference, :loginpreference, index: true | |
end | |
def down |
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
{% from "logentries_agent/map.jinja" import logentries_agent_settings with context %} | |
{% if grains.os_family == 'Debian' %} | |
logentries-repo: | |
pkgrepo.managed: | |
- humanname: Logentries | |
- name: deb http://rep.logentries.com/ {{ grains.oscodename }} main | |
- keyid: C43C79AD | |
- keyserver: pgp.mit.edu | |
- require_in: |
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
[INFO ] lz-salt-master - pillar : pillar/staging/logentries_agent.sls | |
[DEBUG ] S3 Request: https://(mybucket).s3.amazonaws.com/pillar/staging/logentries_agent.sls? | |
[DEBUG ] S3 Headers:: | |
[DEBUG ] Authorization: AWS4-HMAC-SHA256 Credential=XXXX/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=XXXX | |
[INFO ] Starting new HTTPS connection (1): (mybucket).s3.amazonaws.com | |
[DEBUG ] "GET /pillar/staging/logentries_agent.sls HTTP/1.1" 200 225 | |
[DEBUG ] S3 Response Status Code: 200 | |
[DEBUG ] Saving to local file: /var/cache/salt/master/pillar_s3fs/pillar/(mybucket)/pillar/staging/logentries_agent.sls |
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
ext_pillar: | |
- s3: | |
bucket: 'my-obfuscated-bucket' | |
multiple_env: False | |
environment: base | |
verify_ssl: True |
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
virtualbox-iso output will be in this color. | |
==> virtualbox-iso: Downloading or copying Guest additions | |
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso | |
==> virtualbox-iso: Downloading or copying ISO | |
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.10/ubuntu-14.10-server-amd64.iso | |
==> virtualbox-iso: Starting HTTP server on port 8969 | |
==> virtualbox-iso: Creating virtual machine... | |
==> virtualbox-iso: Creating hard drive... | |
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 2838) |
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
ubuntu@salt:/srv/salt$ sudo salt db0\* cron.list_tab deployer | |
db0.mydomain.com: | |
---------- | |
crons: | |
|_ | |
---------- | |
cmd: | |
export BACKUP_SCOPE=full && /usr/local/rbenv/shims/backup perform -t lrnz | |
comment: | |
daymonth: |