npm install
npm run build
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
;; my customizations on Jack Rusher's excellect emacs config | |
;; see https://github.com/jackrusher/dotemacs | |
;; This lives in ~/.emacs/lisp/ | |
;; use find-file to open files | |
(global-set-key (kbd "s-o") 'find-file) | |
;; Project Management | |
(use-package counsel-projectile :ensure t) | |
(use-package projectile :ensure t) |
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
Batman.mixins.timestamp = | |
initialize: -> | |
$timestamp = $(this) | |
timestampWatcher = setInterval (-> | |
if $timestamp.attr("title") isnt "undefined" and $timestamp.attr("title") isnt "" | |
$timestamp.timeago() | |
clearInterval timestampWatcher | |
), 100 |
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
document.addEvent('click:relay(a)', function(event, link) { | |
if (link.getAttribute('rel') == 'external' || link.getAttribute('target') == '_blank') { | |
return; | |
} | |
if (musicIsPlaying) { | |
event.stop(); | |
(function() { | |
link.setAttribute('target', '_blank'); | |
var evt = document.createEvent('MouseEvents'); | |
evt.initMouseEvent("click", true, true, window, |
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
document.addEvent('click:relay(a)', function(event, link) { | |
if (link.getAttribute('rel') == 'external') { | |
return; | |
} | |
if (musicIsPlaying) { | |
event.stop(); | |
(function() { | |
window.open(link.getAttribute('href')); | |
}).delay(100); | |
return; |
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
var ratio = height / width, | |
viewport = window.getSize(); | |
var w, h; | |
if ((viewport.y / viewport.x) > ratio) { | |
h = viewport.y; | |
w = viewport.x / ratio; | |
} | |
else { |
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
document.observe('dom:loaded', function() { | |
var products = $$('.product'); | |
var updateTotal = function() { | |
var total = 0; | |
products.each(function(product) { | |
var amount = product.down('.amount'); | |
if (!amount.value.blank() && ~~(amount.value) > 0) { | |
total += parseFloat(amount.value) * parseFloat(product.down('.entry-price').value); | |
} | |
}); |
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
<p> | |
<script type="text/javascript" charset="utf-8" id="fooo"> | |
function foo() { console.log($('fooo').up()); } | |
foo(); | |
</script> | |
</p> |
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
Effect.Fade = function(element, options) { | |
element = $(element); | |
var oldOpacity = element.getOpacity() || '', | |
options = Object.extend({ | |
after: Prototype.emptyFunction | |
}, options || { }); | |
options.style = 'opacity:0;'; | |
options.after = options.after.wrap(function(proceed, effect) { | |
effect.element.hide().setStyle({ opacity: oldOpacity }); |