This file contains 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 marker = addresspickerMap.addresspicker( "marker"); | |
var map = addresspickerMap.addresspicker( "map"); | |
google.maps.event.addListener(marker, 'click', function() { | |
var infowindow = new google.maps.InfoWindow({content: "bla bla bla"}) | |
infowindow.open(map,marker); | |
}); | |
}); |
This file contains 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 LiquidHandler | |
PROTECTED_ASSIGNS = %w( template_root response _session template_class action_name request_origin session template | |
_response url _request _cookies variables_added _flash params _headers request cookies | |
ignore_missing_templates flash _params logger before_filter_chain_aborted headers ) | |
def self.call(template) | |
new.compile(template) | |
end | |
def compile(template) |
This file contains 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
// If you dont need to call original method | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { | |
_updatePosition: function(){ | |
// Do what you want to | |
} | |
})); | |
// If you need to call original method | |
var _updatePosition = $.ui.addresspicker.prototype._updatePosition; | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { |
This file contains 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
# Extend jQuery objects with Underscore collection methods. | |
# | |
# Each collection method comes in two flavors: one prefixed | |
# with _, which yields a bare DOM element, and one prefixed | |
# with $, which yields a jQuery-wrapped element. | |
# | |
# So if `this` is a jQuery object, instead of: | |
# | |
# _.max @, (el) -> $(el).height() | |
# |
This file contains 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
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript | |
powered JS and SASS powered CSS with YUI compression all via the magic of rack. | |
This stuff will be native in Rails 3.1 and the layout of the files on the | |
filesystem will be different but this guide will get you working with it | |
while we wait for all that to finalize. | |
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist. | |
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention |
This file contains 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
Acceptance test with devise signup with stub for omniauth |
This file contains 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
window.SplitView = Backbone.View.extend({ | |
el: $(document.body), | |
// Delegated mouse down events | |
events: { | |
"mousedown .vsplit": "mouseDownVSplit", | |
"mousedown .hsplit": "mouseDownHSplit" | |
}, | |
initialize: function(element) { |
This file contains 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
Please send us the following information: | |
1. the approximate date of a last purchase made to your Skype account (can be looked up from the credit card statement or from the confirmation email sent to you after the purchase) | |
2. The order number | |
3. The payment method or credit card type used to make a purchase | |
4. The email address that was entered during registration | |
This file contains 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
#ballon { | |
-webkit-transition: all .2s ease-in-out; | |
} |
This file contains 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
If you want to test rails applications (or any web applications) locally with sub-domains and/or setting the locale | |
from the domain name as describe in Rails' guides | |
http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name you have multiple options: | |
- Edit your /etc/hosts file, that sucks! you need admin access and you'll pollute. DO NOT DO THAT! | |
- Use passenger (and passenger pane if you are on Mac OS X), but you need to enter manually all aliases | |
in your apache/nginx config file. painfull | |
- use those URLs 127localhost.com and 127localhost.fr. DNS for all subdomains are setup to IP 127.0.0.1 | |
Nothing to setup/modify locally, just: |