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
config.action_controller.asset_host = Proc.new do |source, request| | |
non_ssl_host = "http://asset#{source.hash % 4}.backpackit.com" | |
ssl_host = "https://asset1.backpackit.com" | |
if request.ssl? | |
case | |
when source =~ /\.js$/ | |
ssl_host | |
when request.headers["USER_AGENT"] =~ /(Safari)/ | |
non_ssl_host |
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
// pure JS | |
function shuffle(array) { | |
return array.sort(function(){ | |
return .5 - Math.random(); | |
}); | |
} | |
// with Prototype.js you can do | |
function shuffle(array){ | |
return array.sortBy(Math.random); |
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
function(s,k){k=s.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);return new Date(Date.UTC(k[1],k[2]-1,k[3],k[4],k[5],k[6]))} |
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
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
<b id=a>X<script>e=document.getElementById('a'),i=0;(function u(){e.style.marginLeft=++i+'px';webkitRequestAnimationFrame(u)})()</script> |
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 beziers = { | |
easeInQuad: '.55,.085,.68,.53', | |
easeInCubic: '.55,.055,.675,.19', | |
easeInQuart: '.895,.03,.685,.22', | |
easeInQuint: '.755,.05,.855,.06', | |
easeInSine: '.47,0,.745,.715', | |
easeInExpo: '.95,.05,.795,.035', | |
easeInCirc: '.6,.04,.98, .335', | |
easeInBack: '.6,-.28,.735,.045', | |
easeOutQuad: '.25,.46,.45,.94', |
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 beziers={easeInQuad:".55,.085,.68,.53",easeInCubic:".55,.055,.675,.19",easeInQuart:".895,.03,.685,.22",easeInQuint:".755,.05,.855,.06",easeInSine:".47,0,.745,.715",easeInExpo:".95,.05,.795,.035",easeInCirc:".6,.04,.98, .335",easeInBack:".6,-.28,.735,.045",easeOutQuad:".25,.46,.45,.94",easeOutCubic:".215,.61,.355,1",easeOutQuart:".165,.84,.44,1",easeOutQuint:".23,1,.32,1",easeOutSine:".39,.575,.565,1",easeOutExpo:".19,1,.22,1",easeOutCirc:".075,.82,.165,1",easeOutBack:".175,.885,.32,1.275",easeInOutQuad:".455,.03,.515,.955",easeInOutCubic:".645,.045,.355,1",easeInOutQuart:".77,0,.175,1",easeInOutQuint:".86,0.07,1",easeInOutSine:".445,.05,.55,.95",easeInOutExpo:"1,0,0,1",easeInOutCirc:".785,.135,.15,.86",easeInOutBack:".68,-.55,.265,1.55"} |
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
b=[".55,.085,.68,.53$.55,.055,.675,.19$.895,.03,.685,.22$.755,.05,.855,.06$.47,0,.745,.715$.95,.05,.795,.035$.6,.04,.98, .335$.6,-.28,.735,.045$.25,.46,.45,.94$.215,.61,.355,1$.165,.84,.44,1$.23,1,.32,1$.39,.575,.565,1$.19,1,.22,1$.075,.82,.165,1$.175,.885,.32,1.275$.455,.03,.515,.955$.645,.045,.355,1$.77,0,.175,1$.86,0.07,1$.445,.05,.55,.95$1,0,0,1$.785,.135,.15,.86$.68,-.55,.265,1.55"].split('$') |
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
b=".55,.085,.68,.53$.55,.055,.675,.19$.895,.03,.685,.22$.755,.05,.855,.06$.47,0,.745,.715$.95,.05,.795,.035$.6,.04,.98, .335$.6,-.28,.735,.045$.25,.46,.45,.94$.215,.61,.355,1$.165,.84,.44,1$.23,1,.32,1$.39,.575,.565,1$.19,1,.22,1$.075,.82,.165,1$.175,.885,.32,1.275$.455,.03,.515,.955$.645,.045,.355,1$.77,0,.175,1$.86,0.07,1$.445,.05,.55,.95$1,0,0,1$.785,.135,.15,.86$.68,-.55,.265,1.55".split('$') |
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
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
OlderNewer