Matteo Depalo matteodepalo

View application.js.coffee
1 2 3 4 5
window.Peacock = Ember.Application.create
Resolver: Ember.DefaultResolver.extend
resolveTemplate: (parsedName) ->
parsedName.fullNameWithoutType = 'peacock/' + parsedName.fullNameWithoutType
return this._super(parsedName
View online_detailed_logging.rb
1 2 3 4 5 6 7 8 9 10
# Outputs this at warn log level:
# 1.2.3.4 GET /path 200 OK BlahController#action HTML 938.2 (DB 11.8, View 719.7) {params} {optional params from flash[:log]}
#
# Save as config/initializers/oneline_detailed_logging.rb. Consider
# decreasing the log level from "info" to "warn" (in production.rb) so
# the one-line log message replaces the standard request logs.
 
 
# override process_action to add 2 things to the payload:
# - remote IP
View fish_prompt.fish
1 2 3 4 5 6 7 8 9 10
set fish_git_dirty_color red
set fish_git_branch_color purple
set fish_ruby_version_color yellow
 
function prompt_git_dirty
git diff > /dev/null 2>&1
if test $status != 0
echo ' ✗'
end
end
View email.rb
1 2 3 4 5 6 7 8 9
class Email < OpenStruct
class Template
def initialize
@@config ||= YAML::load(IO.read(File.join(Rails.root, 'config', 'emails.yml')))
end
 
def method_missing(name, *args, &block)
@@config[name.to_s] or super
end
View docs.txt
1 2 3 4 5 6 7 8 9 10
GET /v1/arenas/7c7cc101-70dd-41dd-a1ec-2ec680c642a0
 
Response body:
 
{
"arena": {
"id": "7c7cc101-70dd-41dd-a1ec-2ec680c642a0",
"name": "Clinton St. Baking Co. & Restaurant",
"latitude": 40.721294,
"longitude": -73.983994,
View spec_helper.rb
1 2 3 4 5 6 7 8 9 10
config.after(:each, type: :request) do
# I want to create a new file for each group of requests
# These grouped by a describe like 'Rounds Requests', 'Arenas Requests'
# The second level in the group describes the action like 'GET /v1/rounds', 'POST /v1/users/me/buddies'
example_group = example.metadata[:example_group]
example_groups = []
 
while example_group
example_groups << example_group
View _fontawesome.scss
1 2 3 4 5 6 7 8 9 10
/* Font Awesome
the iconic font designed for use with Twitter Bootstrap
-------------------------------------------------------
The full suite of pictographic icons, examples, and documentation
can be found at: http://fortawesome.github.com/Font-Awesome/
 
License
-------------------------------------------------------
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
http://creativecommons.org/licenses/by/3.0/ A mention of
View scheduler_default_recipe.rb
1 2 3 4 5 6 7 8 9 10
['backup', 'whenever'].each do |gem_name|
rbenv_gem gem_name
end
 
rbenv_gem 'fog' do
version '~> 1.9.0'
end
 
rbenv_gem 'net-ssh' do
version '2.5.2'
View chef_solo_bootstrap.sh
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xvzf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286/
./configure --prefix=/usr/local
make
make install
View template.sh
1 2 3 4 5 6 7 8 9 10
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
 
if [ ! -f /usr/bin/chef-client ]; then
Something went wrong with that request. Please try again.