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
| require 'firebase' | |
| #before | |
| {"DAYS"=>"Sun,Mon,Tues,Wed,Thurs,Fri,Sat", | |
| "special notes"=> | |
| "[From 11/1 to 1/15]", | |
| "Bourough"=>"Manhattan", | |
| "End time"=>"20:00:00", | |
| "RESTRICTED STREET"=>"Broadway", |
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
| require 'json' | |
| require 'rest' | |
| require 'pry' | |
| require 'firebase' | |
| def to_dow_array(string) | |
| string.downcase.split(",").map do |r| | |
| case r | |
| when "sun" then 1 | |
| when "mon" then 2 |
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
| {"type":"FeatureCollection","totalFeatures":99,"features":[{"type":"Feature","id":"INTERSECTION_CLOSURE.fid-1953874f_1461de89881_57c8","geometry":{"type":"Point","coordinates":[1002099.00583238,199846.290294009]},"geometry_name":"SHAPE","properties":{"ONST":"MORGAN AVENUE","FROMST":"SHARON STREET","BORO":"B","DATE1":"2014-03-28T19:03:00Z","DATE2":"2014-06-28T03:59:00Z","WHY":"D.D.C. CONTRACTOR MAJOR RECONSTRUCTION"}},{"type":"Feature","id":"INTERSECTION_CLOSURE.fid-1953874f_1461de89881_57c9","geometry":{"type":"Point","coordinates":[1002189.30451767,199578.977944133]},"geometry_name":"SHAPE","properties":{"ONST":"METROPOLITAN AVENUE","FROMST":"MORGAN AVENUE","BORO":"B","DATE1":"2014-03-28T19:03:00Z","DATE2":"2014-06-28T03:59:00Z","WHY":"D.D.C. CONTRACTOR MAJOR RECONSTRUCTION"}},{"type":"Feature","id":"INTERSECTION_CLOSURE.fid-1953874f_1461de89881_57ca","geometry":{"type":"Point","coordinates":[1002280.72463175,199311.025472968]},"geometry_name":"SHAPE","properties":{"ONST":"DEVOE STREET","FROMST":"MORGAN AVEN |
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
| app = angular.module("myApp", []) | |
| app.directive "liquidTemplate", -> | |
| linker = (scope, element, attrs) -> | |
| liquid_template = Liquid.parse(scope.templateSrc) | |
| compiled_template = liquid_template.render(scope.templateData) | |
| element.html(compiled_template).show() | |
| return | |
| restrict: "E" | |
| replace: true |
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
| app = angular.module("myApp", []) | |
| app.directive "liquidTemplate", -> | |
| getTemplateFromDom =(selector) -> | |
| $(selector).text() | |
| linker = (scope, element, attrs) -> | |
| template_text = getTemplateFromDom(scope.template) | |
| liquid_template = Liquid.parse(template_text) | |
| compiled_template = liquid_template.render(scope.templateData) | |
| element.html(compiled_template).show() |
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 MinesweeperMap | |
| def initialize(difficulty) | |
| @difficulty = difficulty | |
| case difficulty | |
| when 1 | |
| grid_size = 4 | |
| when 2 | |
| grid_size = 7 | |
| when 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
| <%= num_rows = 10 %> | |
| <%= num_cols = 10 %> | |
| <%= [[[""]][false]] | |
| <table> | |
| <thead></thead> | |
| <tbody> | |
| <% (0...num_row).each do |row| %> | |
| <tr> | |
| <% (0...num_cols).each do |col| %> |
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
| # Code is not reloaded between requests. | |
| config.cache_classes = true | |
| # Eager load code on boot. This eager loads most of Rails and | |
| # your application in memory, allowing both thread web servers | |
| # and those relying on copy on write to perform better. | |
| # Rake tasks automatically ignore this option for performance. | |
| config.eager_load = true | |
| # Full error reports are disabled and caching is turned on. | |
| config.consider_all_requests_local = false |
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
| namespace :assets do | |
| task :add_custom_css_placeholder do | |
| puts 'adding placeholder' | |
| `touch app/assets/stylesheets/custom_css.less` | |
| end | |
| task :remove_custom_css_placeholder do | |
| puts 'removing placeholder' | |
| `rm app/assets/stylesheets/custom_css.less` | |
| end |