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
def generate_display_name | |
@display_name_candidate = generate_display_name_candidate | |
if Member.find_by_display_name(@display_name_candidate) | |
self.display_name = find_next_display_name_available | |
else | |
self.display_name = @display_name_candidate | |
end | |
return true | |
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
require 'rubygems' | |
# Deletes standard route, standard route :format, root route | |
def delete_last_three_lines | |
3.times { @lines.delete_at(-1) } # TODO: change to .drop(3) when using Ruby 1.8.7 | |
end | |
@paths = [] | |
@lines = File.readlines('routes.txt') | |
@lines.delete_at(0) |
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
[{ | |
"description":"It should fail when number is greater then maximum.", | |
"schema":{ | |
"type":"number", | |
"maximum":2012 | |
}, | |
"data":{ | |
"dob": 2013 | |
}, | |
"valid": false |
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
[ | |
{ | |
"description": "integer type", | |
"schema": {"type": "number", "maximum": 2012}, | |
"tests": [ | |
{ | |
"description": "It should pass when number is less then maximum", | |
"data": 1981, | |
"valid": true | |
}, |
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
/opt/boxen/repo/bin/librarian-puppet install --path=/opt/boxen/repo/shared --verbose | |
[Librarian] Ruby Version: 2.0.0 | |
[Librarian] Ruby Platform: universal.x86_64-darwin13 | |
[Librarian] Rubygems Version: 2.0.3 | |
[Librarian] Librarian Version: 0.0.24 | |
[Librarian] Librarian Adapter: puppet | |
[Librarian] Project: /opt/boxen/repo | |
[Librarian] Specfile: Puppetfile | |
[Librarian] Lockfile: Puppetfile.lock | |
[Librarian] Git: /opt/boxen/homebrew/bin/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
upstream blog_unicorn { | |
server unix:/home/vagrant/tmp/sockets/blog_unicorn.sock fail_timeout=0; | |
} | |
upstream redirector_unicorn { | |
server unix:/home/vagrant/tmp/sockets/redirector_unicorn.sock fail_timeout=0; | |
} | |
server { | |
server_name example.com; | |
listen 80; ## listen for ipv4; this line is default and implied |
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
eteotti:~/lab/rich_text_editor/raptor/raptor-build (master) |$ sudo ./bin/update | |
No log handling enabled - using stderr logging | |
Created directory: /var/db/net-snmp | |
Created directory: /var/db/net-snmp/mib_indexes | |
<a href='..'>..</a><br/><a href='README.md'>README.md</a><br/><a href='bin'>bin</a><br/><a href='build'>build</a><br/><a href='package.json'>package.json</a><br/><a href='scripts'>scripts</a><br/>sh: /Users/eteotti/lab/rich_text_editor/raptor/raptor-build/bin/build: Permission denied |
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 Styleguide | |
class BaseTag < Mustache | |
def initialize(parameters={}) | |
@parameters = parameters | |
end | |
def self.base_path | |
"#{Styleguide::Engine.root}/app/assets/mustache/ui_component" | |
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
module Styleguide | |
class BaseTag < Mustache | |
def initialize(parameters={}) | |
@parameters = parameters | |
end | |
def self.base_path | |
"#{Styleguide::Engine.root}/app/assets/mustache/ui_component" | |
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
#!/bin/bash | |
# BUNDLE UPDATE ENHANCER | |
# Preconditions: | |
# all components must have a Gemfile | |
# all components must use RVM and have a .ruby-version and .ruby-gemset | |
if [ $# -eq 0 ]; then | |
echo "💔 No arguments supplied!" | |
echo "You must provide the name of the gem you want to update in your main app and all your components." |