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
if which rbenv &> /dev/null; then | |
RUBY_PROMPT="%{$fg_bold[blue]%}rbenv:%{$reset_color%}(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " | |
fi | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s %{$reset_color%})" | |
PATH_PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$reset_color%}%{$fg[cyan]%}%c%{$reset_color%} ' | |
GIT_PROMPT='%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
PROMPT="%{$fg[blue]%}%D{[%I:%M:%S]} $PATH_PROMPT$RUBY_PROMPT$GIT_PROMPT |
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 SectionsController < ApplicationController | |
before_action :set_section, only: [:show, :edit, :update, :delete, :destroy] | |
layout 'admin' | |
def index | |
@sections = Section.sorted | |
end | |
def show |
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 main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"log" | |
"math/rand" | |
"net/http" | |
"runtime" | |
// "strconv" |
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
{ | |
"name": "angular-curve", | |
"version": "0.0.0", | |
"description": "Description", | |
"homepage": "https://github.com/kenhkan/angular-curve", | |
"author": "Kenneth Kan <[email protected]>", | |
"licenses": { | |
"type": "MIT", | |
"url": "https://github.com/kenhkan/angular-curve/blob/master/LICENSE" | |
}, |
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 Node | |
attr_accessor :value, :next_node | |
def initialize(val, next_in_line) | |
@value = val | |
@next_node = next_in_line | |
puts "Initialized a Node with value: #{value}" | |
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
source 'https://rubygems.org' | |
gem 'torqbox' | |
# gem 'jdbc-postgres' | |
gem 'jdbc-mysql' | |
# gem 'activerecord' | |
# gem 'activerecord-jdbcpostgresql-adapter' | |
gem 'activerecord-jdbc-adapter' | |
# gem 'activerecord-jdbcmysql-adapter' | |
# gem 'sequel' |
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
source 'https://rubygems.org' | |
gem 'torqbox' |
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
guard :rspec do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { "spec" } | |
# Rails example | |
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } | |
watch('config/routes.rb') { "spec/routing" } |
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
source 'https://rubygems.org' | |
gem 'rails', '>= 4.1.0.rc2' | |
gem 'mongoid', github: 'mongoid/mongoid' | |
gem 'moped', github: 'mongoid/moped' | |
gem 'jbuilder', '~> 2.0' | |
gem 'multi_json' | |
# bundle exec rake doc:rails generates the API under doc/api. |
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
MOPED: 127.0.0.1:27017 QUERY database=rails_api_development collection=users selector={"_id"=>{"$oid"=>BSON::ObjectId('533c3958616c641142010000')}} flags=[] limit=0 skip=0 batch_size=nil fields=nil runtime: 1.0680ms | |
Completed 500 Internal Server Error in 15ms | |
Moped::Errors::QueryFailure - The operation: #<Moped::Protocol::Query | |
@length=89 | |
@request_id=2 | |
@response_to=0 | |
@op_code=2004 | |
@flags=[] | |
@full_collection_name="rails_api_development.users" |