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
// Generated by CoffeeScript 1.3.3 | |
/** | |
@author Michael Czolko <michael@czolko.cz> | |
*/ | |
var Reflector; | |
Reflector = (function() { | |
/** | |
@construct |
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 arr = ["a", "b", "c"]; | |
print(Object.getOwnPropertyNames(arr).sort()); // prints "0,1,2,length" | |
// Array-like object | |
var obj = { 0: "a", 1: "b", 2: "c"}; | |
print(Object.getOwnPropertyNames(obj).sort()); // prints "0,1,2" | |
// Printing property names and values using Array.forEach | |
Object.getOwnPropertyNames(obj).forEach(function(val, idx, array) { | |
print(val + " -> " + obj[val]); |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC] | |
RewriteCond %{REQUEST_URI} !^/sub\-folder/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ /sub-folder/$1 | |
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC] | |
RewriteRule ^(/)?$ sub-folder/index.php [L] |
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
$ -> | |
add_click_to_clicktale_playback = (element) -> | |
ClickTaleExec("jQuery('#{window.getXPathFor(element)}').click()") | |
# $("#load_more .button").on "click", -> | |
# add_click_to_clicktale_playback($(this)) | |
# $("#tabs .tabs_titles li a").on "click", -> | |
# add_click_to_clicktale_playback($(this)) |
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 Rails.env.production? | |
PAYPAL_ACCOUNT = 'production@gmail.com' | |
else | |
PAYPAL_ACCOUNT = 'development@gmail.com' | |
ActiveMerchant::Billing::Base.mode = :test | |
end |
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
/* Commonly used mixins for CSS3 in SASS | |
by Ben Sargent (2012) | |
www.brokendigits.com | |
*/ | |
/* generically prefix any property name */ | |
@mixin prefix($name, $value) { | |
-webkit-#{$name}: $value; | |
-moz-#{$name}: $value; |
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.track = (event_name, event_description) -> | |
analytics.track(event_name) unless typeof analytics == 'undefined' | |
mixpanel.track(event_name) unless typeof mixpanel == 'undefined' | |
ga_track_event(event_name, event_description) | |
window.logActionKPI = (name) -> | |
$.get "/api/kpis/log_action", { kpi: { name: name } } | |
$ -> |
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.track = (event_name, event_description) -> | |
analytics.track(event_name) unless typeof analytics == 'undefined' | |
mixpanel.track(event_name) unless typeof mixpanel == 'undefined' | |
ga_track_event(event_name, event_description) | |
window.logActionKPI = (name) -> | |
$.get "/api/kpis/log_action", { kpi: { name: name } } | |
$ -> |
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
/** | |
* Inspired by AngularJS' implementation of "click dblclick mousedown..." | |
* | |
* This ties in the Hammer events to attributes like: | |
* | |
* hm-tap="add_something()" | |
* hm-swipe="remove_something()" | |
* | |
* and also has support for Hammer options with: | |
* |