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
Last login: Wed Dec 3 00:10:05 on ttys000 | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config ; exit; | |
Jeffreys-MacBook-Pro:~ knoxjeffrey$ /Users/knoxjeffrey/Ruby/programming_introduction/.git/config ; exit; | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 1: [core]: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 2: repositoryformatversion: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 3: filemode: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 4: bare: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 5: logallrefupdates: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 6: ignorecase: command not found | |
/Users/knoxjeffrey/Ruby/programming_introduction/.git/config: line 7: precomposeunicode: command not found |
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
module Text | |
def self.print_string(text) | |
puts "\n*** #{text} ***" | |
end | |
def self.chomp_it | |
gets.chomp | |
end | |
end |
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
class NotesController < ApplicationController | |
def index | |
load_notes | |
end | |
def show | |
load_note | |
end | |
def new |
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
--- | |
layout: default | |
--- | |
<section class="posts postindex wrapper"> | |
{% for post in site.posts %} | |
{% capture month %}{{ post.date | date: '%m%Y' }}{% endcapture %} | |
{% capture nmonth %}{{ post.next.date | date: '%m%Y' }}{% endcapture %} | |
{% if month != nmonth %} | |
{% if forloop.index != 1 %}</ul>{% endif %} |
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
#!/bin/bash | |
# | |
# Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS | |
# | |
# sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 & | |
# See orig here: https://gist.github.com/whyvez/8d19096712ea44ba66b0 | |
# Go to ec2-user home directory | |
cd /home/ec2-user |
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
#!/bin/bash | |
# | |
# Go to ec2-user home directory | |
cd /home/ec2-user | |
# Update libpng first | |
curl -L http://sourceforge.net/projects/libpng/files/libpng15/1.5.27/libpng-1.5.27.tar.xz/download -o libpng.tar.xz | |
tar -Jxf libpng.tar.xz | |
cd libpng-1.5.27/ |
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
# rake db:pull[<environment to pull from>,<your local db username>] | |
# eg. rake db:pull[staging,postgres] | |
namespace :db do | |
desc 'Pull specified db to development' | |
task :pull, :environment, :dev_db_user do |_t, args| | |
environment = args[:environment].to_sym | |
dev_db_user = args[:dev_db_user] | |
dev = Rails.application.config.database_configuration['development'] | |
dumpfile = "#{Rails.root}/tmp/latest.dump" |
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
# rake db:staging_to_production | |
# eg. rake db:staging_to_production | |
namespace :db do | |
desc 'Pull specified db to development, move to production' | |
task :staging_to_production do | |
dumpfile = "#{Rails.root}/tmp/latest.dump" | |
ssh = Rails.application.credentials[:staging][:ssh] | |
ssh_port = Rails.application.credentials[:staging][:ssh_port] |
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
# rake media:pull[<environment to pull from>] | |
# eg. rake media:pull[staging] | |
namespace :media do | |
desc 'Pull media from specified environment to development' | |
task :pull, :environment do |_t, args| | |
environment = args[:environment].to_sym | |
ssh = Rails.application.credentials[environment][:ssh] | |
ssh_port = Rails.application.credentials[environment][:ssh_port] | |
media_remote = Rails.application.credentials[environment.to_sym][:media_remote] |
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
# rake media:staging_to_production | |
# eg. rake media:staging_to_production | |
namespace :media do | |
desc 'Pull media from specified staging to production' | |
task :staging_to_production do | |
ssh_staging = Rails.application.credentials[:staging][:ssh] | |
ssh_staging_port = Rails.application.credentials[:staging][:ssh_port] | |
media_staging_remote = Rails.application.credentials[:staging][:media_remote] | |
media_production_remote = Rails.application.credentials[:production][:media_remote] |
OlderNewer