Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| /* Flatten das boostrap */ | |
| .well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
| -moz-box-shadow: none !important; | |
| -webkit-box-shadow: none !important; | |
| box-shadow: none !important; | |
| -webkit-border-radius: 0px !important; | |
| -moz-border-radius: 0px !important; | |
| border-radius: 0px !important; | |
| border-collapse: collapse !important; | |
| background-image: none !important; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <!-- Main navigation fixed on top --> | |
| <div class="navbar navbar-static-top"> | |
| <div class="navbar-inner"> | |
| <div class="container"> | |
| <%= link_to image_tag('56k.co-logo.png'), root_url, :class => 'brand' %> | |
| <ul class="nav"> | |
| <li class="active"> | |
| <a href="<%= root_url %>">Home</a> | |
| </li> |
| class Book | |
| attr_accessor :title | |
| def initialize | |
| @title = {} | |
| end | |
| def title | |
| words = @title.split | |
| lower = %w{the a in of an and} # don't caps me bro! | |
| words.each do |t| |
| class String | |
| def title_case | |
| stringarray = self.split | |
| returnarray = [] | |
| articles = ["and", "of", "the", "a"] | |
| stringarray.each do |a| | |
| if stringarray.rindex(a) == 0 | |
| a.capitalize! | |
| returnarray << a + " " |
| class Package | |
| attr_accessor :contents | |
| attr_reader :from_location | |
| attr_accessor :to_location | |
| attr_reader :current_location | |
| attr_reader :stops | |
| def self.delivery_est(from, to) | |
| if from == "San Francisco, CA" && to == "Chicago, IL" | |
| 2 |
| class CoursesController < ApplicationController | |
| # GET /courses | |
| # GET /courses.json | |
| def index | |
| @courses = Course.all | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.json { render json: @courses } | |
| end |
| class Array | |
| def new_count | |
| col = [] | |
| self.each do |v| | |
| if yield(v) == false | |
| 0 | |
| elsif yield(v) == true | |
| col << true | |
| col.length | |
| else |
| class Array | |
| def new_count(&proc) | |
| if proc | |
| self.select(&proc).length | |
| else | |
| self.length | |
| end | |
| end | |
| end |
| module InWords | |
| def in_words | |
| # recursion steps | |
| # 573_917_408.in_words.should == | |
| # "(five hundred seventy three) million | |
| # (nine hundred seventeen) thousand | |
| # (four hundred) | |
| # eight" | |
| num = [] |