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
| # you should rely ONLY in the class level interface in your views, aka | |
| # | |
| # Asset.thumbnail(path, :dimensions => '42x42').url | |
| # | |
| # Asset.bw(path).url | |
| # | |
| # and no lib internals for now - this is under development | |
| # | |
| # this lib handles a few things in a simple interface. highlights: | |
| # |
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
| =begin | |
| 1) save this file in the rails_root as 'a.rb' | |
| 2) run | |
| ~> ./bin/rails runner a.rb | |
| 3) it should print out something like |
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
| show = proc do |a| | |
| "#{ a.class.name }[account: #{ a.account.slug.inspect }, name: #{ a.name.inspect }, id: #{ a.id }]" | |
| end | |
| audience = Audience.where(:id => '5a87337cbfe1a449740024db').first | |
| audience.destroy | |
| puts "DESTROY: #{ show[audience] }" | |
| puts | |
| Audience.all.each do |doc| |
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
| show = proc do |a| | |
| "#{ a.class.name }[account: #{ a.account.slug.inspect }, name: #{ a.name.inspect }, id: #{ a.id }]" | |
| end | |
| audience = Audience.where(:id => '5a87337cbfe1a449740024db').first | |
| audience.destroy | |
| puts "DESTROY: #{ show[audience] }" | |
| puts | |
| Audience.all.each do |doc| |
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
| # ref: http://www.jsonrpc.org/specification | |
| # | |
| # stdlibs | |
| # | |
| require 'net/http' | |
| # gems | |
| # | |
| require 'addressable/uri' |
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 WebpackController < ApplicationController | |
| include ReverseProxy::Controller | |
| # https://stackoverflow.com/questions/10883211/deadly-cors-when-http-localhost-is-the-origin | |
| # | |
| layout false | |
| HEADERS = | |
| { | |
| # |
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
| =begin | |
| - if we just add a field we need to | |
| - avoid adding 'home away properties' to the SearchLocation table | |
| file: app/models/search_location.rb |
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
| --- | |
| 55e9bb414ebabf7667000022: | |
| created_at: 2015-09-04 15:39:45.888000000 Z | |
| updated_at: 2017-08-15 22:43:17.349000000 Z | |
| 55f193104ebabf6a5300000f: | |
| created_at: 2015-09-10 14:26:24.925000000 Z | |
| updated_at: 2015-09-10 14:28:02.648000000 Z | |
| 55f2d9f74ebabf47b6000013: | |
| created_at: 2015-09-11 13:41:11.380000000 Z | |
| updated_at: 2015-09-11 15:08:55.310000000 Z |
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 ruby | |
| require 'csv' | |
| require 'pp' | |
| require 'readline' | |
| require 'fileutils' | |
| require 'rubygems' | |
| require 'main' |
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 | |
| # <%= sass_eval 'opacify($red, 0.6)' %> | |
| def sass_eval(expr) | |
| css = ::Sass.compile("#value { value: #{ expr }; }") # ".value {\n value: $sass_processed_arg; }\n" | |
| css.split('value:', 2).last.split(';', 2).first.strip | |
| end | |
| end |