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
| var foo = 1; | |
| function bar() { | |
| if (!foo) { | |
| var foo = 10; | |
| } | |
| alert(foo); | |
| } | |
| bar(); | |
| var a = 1; |
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 NewsController < ApplicationController | |
| meta_data :news, [:index] | |
| def index | |
| puts "page = #{@page}" | |
| render text: @page | |
| 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
| +----------------------+-------+-------+---------+---------+-----+-------+ | |
| | Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
| +----------------------+-------+-------+---------+---------+-----+-------+ | |
| | Controllers | 6209 | 4670 | 71 | 546 | 7 | 6 | | |
| | Helpers | 362 | 308 | 0 | 46 | 0 | 4 | | |
| | Models | 2850 | 1919 | 84 | 262 | 3 | 5 | | |
| | Mailers | 164 | 141 | 3 | 18 | 6 | 5 | | |
| | Javascripts | 15487 | 11331 | 1 | 1170 | 1170 | 7 | | |
| | Libraries | 2536 | 1852 | 26 | 122 | 4 | 13 | | |
| | Model specs | 38 | 29 | 0 | 0 | 0 | 0 | |
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
| <div class="slider-container"> | |
| <div class="slider-clip"> | |
| <ul id="ts-premium-container"></ul> | |
| </div> | |
| <ul class="slider-controls"> | |
| <li class="prev"> | |
| <a href="#prev">Previous</a> | |
| </li> | |
| <li class="next"> | |
| <a href="#next">Next</a> |
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 | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
| +----------------------+-------+-------+---------+---------+-----+-------+ | |
| | Controllers | 1549 | 1256 | 54 | 215 | 3 | 3 | | |
| | Helpers | 461 | 384 | 0 | 45 | 0 | 6 | | |
| | Models | 1677 | 1295 | 44 | 133 | 3 | 7 | | |
| | Mailers | 34 | 29 | 3 | 4 | 1 | 5 | | |
| | Javascripts | 7858 | 5427 | 0 | 588 | 0 | 7 | | |
| | Libraries | 1608 | 1378 | 14 | 86 | 6 | 14 | | |
| | Controller specs | 238 | 191 | 0 | 0 | 0 | 0 | |
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
| Wondr.Views.Header = Backbone.Marionette.ItemView.extend | |
| el: 'header' | |
| update_state: (current) -> | |
| @$('#primary li').removeClass('current') | |
| @$("#primary li.#{current}").addClass('current') if current? | |
| init: -> | |
| $( '.account' ).makisu({ |
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
| +----------+---------------+ | |
| | count(*) | DATE(created) | | |
| +----------+---------------+ | |
| | 11 | 2014-01-01 | | |
| | 8 | 2014-01-02 | | |
| | 24 | 2014-01-03 | | |
| | 13 | 2014-01-04 | | |
| | 3 | 2014-01-05 | | |
| | 25 | 2014-01-06 | | |
| | 30 | 2014-01-07 | |
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 Model < ActiveRecord::Base | |
| include Tire::Model::Search | |
| include Tire::Model::Callbacks | |
| mapping do | |
| indexes :id, :index => :not_analyzed | |
| indexes :custom_id, :index => :not_analyzed | |
| indexes :slug, :index => :not_analyzed | |
| indexes :name, :analyzer => 'snowball', boost: 3 |
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
| root@new:~# apt-get install postgresql postgresql-contrib | |
| Reading package lists... Done | |
| Building dependency tree | |
| Reading state information... Done | |
| The following extra packages will be installed: | |
| libossp-uuid16 libpq5 libxslt1.1 postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-contrib-9.1 ssl-cert | |
| Suggested packages: | |
| uuid oidentd ident-server locales-all postgresql-doc-9.1 libdbd-pg-perl openssl-blacklist | |
| The following NEW packages will be installed: | |
| libossp-uuid16 libpq5 libxslt1.1 postgresql postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-9.1 ssl-cert |
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 InitMap | |
| constructor: (element, data) -> | |
| latlng = new google.maps.LatLng(data.lat, data.long) | |
| options = | |
| zoom: 12 | |
| center: latlng | |
| mapTypeId: google.maps.MapTypeId.ROADMAP | |
| map = new google.maps.Map(element, options) |
NewerOlder