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
| # application_helper.rb | |
| def backbone_router(resource, collection) | |
| <<-eos | |
| $(function() { | |
| window.router = new #{APP_NAME.capitalize}.Routers.#{resource.capitalize}Router({#{resource.downcase}:#{collection.to_json.html_safe}}); | |
| Backbone.history.start(); | |
| }); | |
| eos | |
| 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
| (function($) { | |
| $.Loadingdotdotdot = function(el, options) { | |
| var base = this; | |
| base.$el = $(el); | |
| base.$el.data("Loadingdotdotdot", base); | |
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 ApplicationHelper | |
| def content_for_or_pjax(name, &block) | |
| request.headers['X-PJAX'] ? capture(&block) : content_for(name, &block) | |
| 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
| http://dev.opera.com/articles/view/beautiful-ui-styling-with-css3-text-shadow-box-shadow-and-border-radius/ | |
| Here I’ve applied rgba colours to the shadows, so most of this box is semi-transparent. I have added a second div around the first one with a repeating background pattern image applied to it, so you can appreciate the full extent of this effect. | |
| div { | |
| width: 100px; | |
| height: 100px; | |
| margin: 10px; | |
| padding: 0; | |
| border: 1px solid rgba(0,0,0,0.5); |
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
| *.rbc | |
| *.sassc | |
| .sass-cache | |
| capybara-*.html | |
| .rspec | |
| /.bundle | |
| /vendor/bundle | |
| /log/* | |
| /tmp/* | |
| /db/*.sqlite3 |
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
| *.gem | |
| *.rbc | |
| .bundle | |
| .config | |
| coverage | |
| InstalledFiles | |
| lib/bundler/man | |
| pkg | |
| rdoc | |
| spec/reports |
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 PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
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
| # Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` | |
| # Be sure to have rails and thin installed. | |
| require "rubygems" | |
| # We are not loading Active Record, nor the Assets Pipeline, etc. | |
| # This could also be in your Gemfile. | |
| gem "actionpack", "~> 3.2" | |
| gem "railties", "~> 3.2" | |
| # The following lines should come as no surprise. Except by |
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
| http://www.retrojunkie.com/asciiart/money/bills.txt | |
| _____________________________________________________________________ | |
| |.============[_F_E_D_E_R_A_L___R_E_S_E_R_V_E___N_O_T_E_]============.| | |
| ||%&%&%&%_ _ _ _ _ _ _ _ _ _ _ _ _ %&%&%&%&|| | |
| ||%&%&%&/||_||_ | ||\||||_| \ (_ ||\||_(_ /\|_ |\|V||_|)|/ |\ \%&%&%|| | |
| ||&%.--.}|| ||_ \_/| ||||_|_/ ,_)|||||_,_) \/| ||| ||_|\|\_||{.--.%&|| | |
| ||%/__ _\ ,-----,-'____'-,-----, /__ _\ || | |
| ||||_ / \| [ .-;"`___ `";-. ] ||_ / \||| | |
| ||| \| || """""""""" 1 `).'.'.'`_ _'. '.'.(` A 76355942 J | \| |||| |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |