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
// calculate end day | |
// note, end day should be the final second | |
// of the final day (23:59:59) and 1 day | |
// before today | |
var end_time = parseInt(new Date().setUTCHours(23,59,59,59)/1000 - 86400, 10), | |
// calculate start day, x number of days before | |
// end day, note start day should be the start | |
// of the day (00:00:00) | |
start_time = parseInt(new Date((end_time - (days_ago * 86400)) * 1000).setUTCHours(0,0,0,0) / 1000, 10); |
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
archive(){ | |
for var in "$@" | |
do | |
if [ -z "$var" ] | |
then | |
echo "You must supply a folder to archive." | |
return | |
else | |
if [ -d $var ] | |
then |
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 end_time = new Date().setUTCHours(23,59,59,59).getTime(); |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
#------------------------------------------------------------------------------- | |
# Sunrise theme for oh-my-zsh by Adam Lindberg ([email protected]) | |
# Intended to be used with Solarized: http://ethanschoonover.com/solarized | |
# (Needs Git plugin for current_branch method) | |
#------------------------------------------------------------------------------- | |
# Modified by Sundeep Malladi to include Mercurial (and some other shtuff). | |
# Color shortcuts | |
R=$fg[red] |
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 Request = require('request').Request, | |
_ = require('./underscore'), | |
Backbone = require('./backbone'), | |
// Firefox Add-Ons cannot use jQuery in the background | |
// script, but there are instances where we need some | |
// jquery functionality, paricularly $.ajax, which | |
// is defined later. | |
$ = { | |
ajax: function (params) { | |
if (!params.url){ |
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
noremap <silent> <leader>l :call FlipScheme()<cr> | |
function! FlipScheme() | |
if g:colors_name == 'hemisu' | |
set background=dark | |
color jellybeans | |
else | |
set background=light | |
color hemisu | |
endif | |
endfunction |
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
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix. | |
;; | |
;; * :use makes functions available without a namespace prefix | |
;; (i.e., refers functions to the current namespace). | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; |
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
define ( ['somewhere/someFunc'], function (someFunction) { | |
return someFunction(anotherFunction); | |
function anotherFunction() { | |
// stuff | |
}; | |
}); |
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
javascript:(function()%7Bvar profileCardInner%3Ddocument.getElementsByClassName(%27profile-card-inner%27),jsTopbar,userId,div%3Bif(profileCardInner%26%26profileCardInner.length)%7BprofileCardInner%3DprofileCardInner%5B0%5D%3BuserId%3DprofileCardInner.dataset.userId%3Bdiv%3Ddocument.createElement(%27div%27)%3Bdiv.innerHTML%3DuserId%3Bdiv.style.backgroundColor%3D%27black%27%3Bdiv.style.opacity%3D"0.8"%3Bdiv.style.height%3D"33px"%3Bdiv.style.width%3D"100%25"%3Bdiv.style.position%3D"fixed"%3Bdiv.style.top%3D"0"%3Bdiv.style.left%3D"0"%3Bdiv.style.zIndex%3D"999"%3Bdiv.style.fontSize%3D"20px"%3Bdiv.style.color%3D"white"%3Bdiv.style.paddingTop%3D"13px"%3Bdiv.style.textAlign%3D"center"%3BjsTopbar%3Ddocument.getElementsByClassName(%27js-topbar%27)%3Bif(jsTopbar.length)%7BjsTopbar%3DjsTopbar%5B0%5D%3BjsTopbar.insertBefore(div,jsTopbar.firstChild)%3B%7D%7D%7D)()%3B |
OlderNewer