A mixin to create easily create the newest fad in design: long shadows!
A Pen by Gal Schlezinger on CodePen.
| /** | |
| * Nicely scrolls the window to a certain place in a page | |
| * @param whereTo jQuery|px to scroll to | |
| * @param speed in ms. default - 700 | |
| * @param easing the easing. default - easeOutCirc | |
| */ | |
| scrollWindowTo = function(whereTo, speed, easing) { | |
| if (!speed) speed = 700; | |
| if (!easing) easing = jQuery.easing["easeOutCirc"] ? "easeOutCirc" : null; |
| # Git branch parsing | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
| } | |
| # Prompt | |
| export PS1="\[\e[33m\]\u\[\e[0m\] \w\[\e[32m\]\$(parse_git_branch)\[\e[0m\] \[\e[1;34m\]≋\[\e[0m\] " | |
| # Aliases | |
| alias ls="ls --color" # LSing in color! |
| /** | |
| * Prevents mouse scrolling on the whole page, and just scrolls that awesome selected item. | |
| * I don't remember where I found this code, but here it is, converted to jQuery's awesome stuff. | |
| * | |
| * @example $("ul#awesome-but-long-list").mouseScroll(); | |
| * @return jQuery $(this), for fluent access | |
| */ | |
| $.fn.mouseScroll = function () { | |
| return $(this).bind('mousewheel DOMMouseScroll', function (e) { | |
| var delta = e.wheelDelta || -e.detail || e.originalEvent.wheelDelta; |
| /** | |
| * Creates an iScroll instance and returns it. | |
| * use string as the options param for calling a function. | |
| * you can use the args for sending it to the function! | |
| * | |
| * @param {JSON} options for the new iScroll item | |
| * if its a string, it will call the specific function | |
| * @param arg arguments for sending the args to the selected function. | |
| * | |
| * @return IScroll for the current item. |
A mixin to create easily create the newest fad in design: long shadows!
A Pen by Gal Schlezinger on CodePen.
| //------------------- | |
| // Watch this scheme in Colour Lovers: http://www.colourlovers.com/palette/3022861/Grass_Fields_Forever | |
| //------------------- | |
| $white: #fff | |
| $grey: #f7f7f7 | |
| $lightGreen: #d9f5d2 | |
| $medGreen: #ace198 | |
| $darkGreen: #90d074 |
| namespace :god do | |
| desc "Hot-reload God configuration for the new release Resque worker" | |
| task :reload_release do | |
| run "cd #{release_path} && god && god load config/resque.god && god restart resque" | |
| end | |
| desc "Hot-reload God configuration for the current release Resque worker" | |
| task :reload_current do | |
| run "cd #{current_path} && god && god load config/resque.god && god restart resque" | |
| end |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |