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
| upstream localhost { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| # Set the max size for file uploads to 50Mb | |
| client_max_body_size 80M; |
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
| r.namespace :admin do |admin| | |
| admin.resources :products | |
| r.resources :product_lines do |product_line| | |
| product_line.resources :products | |
| end | |
| 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
| module Admin | |
| class Items < Application | |
| # provides :xml, :yaml, :js | |
| def index | |
| @items = Item.all | |
| display @items | |
| end | |
| def show(id) |
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
| # lib/color_logger.rb | |
| module Merb | |
| class Logger | |
| # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # 30 = black 31 = red 32 = green 33 = yellow blue 34 = 35 = magenta 36 = cyan 37 = white | |
| Colors = Mash.new({ | |
| :fatal => 31, | |
| :error => 31, | |
| :warn => 33, | |
| :info => 38, |
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 Segment | |
| include DataMapper::Resource | |
| property :id, Serial | |
| property :title, String | |
| has n, :products, :through => Resource | |
| end | |
| class Product | |
| include DataMapper::Resource | |
| property :id, Integer, :serial => 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
| thor merb:gem:list | |
| Installed local gems: | |
| ~ ParseTree-3.0.2 | |
| ~ RubyInline-3.8.1 | |
| ~ ZenTest-3.11.0 | |
| ~ abstract-1.0.0 | |
| ~ addressable-1.0.4 | |
| ~ data_objects-0.9.6 | |
| ~ dm-aggregates-0.9.6 | |
| ~ dm-core-0.9.6 |
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 'tempfile' | |
| require 'java' if defined?(JRUBY_VERSION) | |
| require 'test/unit' | |
| require 'fileutils' | |
| class TestTempfilesCleanUp < Test::Unit::TestCase | |
| def setup | |
| @tmpdir = "tmp_#{$$}" | |
| Dir.mkdir @tmpdir rescue nil |
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
| var sys = require('sys'), | |
| exec = require('child_process').exec; | |
| // fs = require('fs'); | |
| // ecsv = require('ecsv') | |
| function Queue () { | |
| var waiting = []; | |
| this.max = -1; | |
| this.current = 0; | |
| //run checks if we're under the max processors, and runs if there is room. |
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
| find . -name '*.DS_Store' -type f -delete | |
| cd /opt/boxen/rbenv/plugins/ruby-build/ && git pull |
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
| export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
| export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
| alias gst="git status" | |
| alias gpr="git pull --rebase" | |
| alias dev="git checkout develop" |