export default DS.RESTAdapter.extend({
headers: {
'Accept': 'application/vnd.impetu-v1+json'
},
});
export default DS.RESTadapter.extend({
require 'grape' | |
class API < Grape::API | |
before do | |
@log_start_t = Time.now | |
Rails.logger.info " Parameters: #{params.to_hash.except("route_info")}" | |
end | |
after do | |
@log_end_t = Time.now |
export default DS.RESTAdapter.extend({
headers: {
'Accept': 'application/vnd.impetu-v1+json'
},
});
export default DS.RESTadapter.extend({
This feature is useful in search-as-you-type components to rely on the backend to perform the search. For example, http://hola-apps.herokuapp.com/apps/search?term=farts
Following this great comment in Stackoverflow.
This ember addon will extend DS.RESTAdapter
initially to be able to cancel an on going HTTP request by invoking store.cancelQuery('resourceType')
:rocket: :cloud: :cloud: :sunny: :cloud: :cloud: SHEEP EAT
# To get this gist running use Ruby 1.9.2 or greater and: | |
# brew install proj | |
# gem install proj4rb | |
# | |
# http://spatialreference.org/ref/epsg/25831/ | |
require 'proj4' | |
utm_point = Proj4::Point.new(43718.773, 72605.572) | |
utm30 = Proj4::Projection.new(proj: "utm", zone: "30", units: "m", ellps: 'intl') |
# http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html#method-c-load | |
# http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html#method-c-dump | |
# https://github.com/JEG2/faster_csv/blob/master/test/tc_serialization.rb | |
require 'csv' | |
class Person | |
attr_accessor :id, :name, :email | |
def self.csv_load(meta, headers, row) | |
person = Person.new |
# These modules should be loaded by default: proxy_module, proxy_balancer_module, rewrite_module | |
Listen *:80 | |
# You may want to keep the VirtualHost config under extra/*.conf | |
# Start your thin | |
<VirtualHost *:80> | |
ServerName wwww.yourawesomeapp.dev |
export PYTHONBREW_PROJECT_VENV='your_projects_venv' | |
export PYTHONBREW_PYTHON_VERSION='2.7.3' |
M::Document.configure do |config| | |
config.placeholder_format = "%:placeholder%" | |
end | |
class CustomerDetails | |
include M::DocumentFragment | |
include ActionView::Helpers::NumberHelper | |
subs :name, type: M::Text | |
subs :last_name, type: M::Text |
$ = jQuery | |
class GoogleChartWrapper | |
@defaults = {} | |
constructor: (@$el, @options={}) -> | |
$.extend true, @options, @defaults, @$el.data() | |
@chart = new google.visualization.ChartWrapper options | |
@chart.draw() | |
$.fn.chartWrapper = (options={}) -> | |
@each -> |