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
import { terser } from "rollup-plugin-terser" | |
import path from "path" | |
import resolve from "rollup-plugin-node-resolve" | |
import babel from "rollup-plugin-babel" | |
import glob from "glob" | |
const scriptPattern = path.resolve(__dirname, "_scripts/**/!(_)*.js") | |
const inputs = glob.sync(scriptPattern).reduce((files, input) => { | |
const parts = input.split("/") |
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
namespace :db do | |
task :backup do | |
path = dump_path(Time.now) | |
puts "Backup to #{path}" | |
system "pg_dump -Fc --no-owner --dbname=#{db_name} > #{path}" | |
end | |
task :load, :file, :options do |t, args| |
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
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
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
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
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
default: &default | |
adapter: postgresql | |
encoding: unicode | |
username: postgres | |
password: | |
pool: 5 | |
host: db | |
production: |
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
--- | |
BUNDLE_PATH: .bundle | |
BUNDLE_BIN: ./bin |
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
for file in *.jpg | |
do | |
echo "Converting $file" | |
convert $file -resize 800x output/$file | |
done |
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
SETUP | |
#You must install ruby v1.8.7, using rbenv & rbenv install or rvm | |
#you can find out with ruby -v | |
#You must install mysql | |
gem install -v=2.0.1 rails | |
gem install -v=2.4.2 rdoc |
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
gem 'rack-proxy', git: 'https://github.com/nhemsley/rack-proxy.git' |
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
require 'rack-proxy' | |
require 'pry' | |
class Rack::RailsProxy < Rack::Proxy | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
NewerOlder