View detect caps lock.js
function checkCapslock (e) { | |
var $el = $(this), | |
hasLabel = $el.parent().find('.capslock-on-alert').length > 0 ? true : false; | |
var kc = e.keyCode?e.keyCode:e.which; | |
var sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false); | |
var isCaps = ((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk); | |
if(isCaps && !hasLabel) { |
View _shadow-3d.scss
// usage text-shadow / box-shadow : shadow-3d($color, $length); | |
// adds pseudo-3d vertical shadow | |
@function shadow-3d($col, $h){ | |
$str : ""; | |
$shadow-col : darken($col, 5%); | |
@for $i from 1 through $h{ | |
$str : "#{$str} 0 #{$i}px 0 #{$shadow-col},"; | |
} |
View gist:3178258
// geo-location shim | |
// currentely only serves lat/long | |
// depends on jQuery | |
// doublecheck the ClientLocation results because it may returning null results | |
;(function(geolocation){ | |
if (geolocation) return; |
View .bashrc
alias ls="ls -a --color=always" | |
alias work="cd /d/Work" | |
alias ga="git add ." | |
alias gs="git status" | |
alias gc="git commit -a -m" | |
alias gp="git pull" | |
alias gpp="git push" | |
alias cw="compass watch" | |
alias edit="/c/Program\ Files/Sublime\ Text\ 2/sublime_text.exe" | |
alias explore="explorer " |
View Preferences.sublime-settings
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
View ckeditor.coffee
angular.module('app.directives.ckeditor', []) | |
.directive 'ckeditor', -> | |
require: '?ngModel' | |
link: (scope, elm, attr, ngModel)-> | |
ck = CKEDITOR.replace elm[0] | |
unless ngModel then return | |
ck.on 'pasteState', -> | |
scope.$apply -> | |
ngModel.$setViewValue ck.getData() | |
ngModel.$render = (value)-> ck.setData ngModel.$viewValue |
View ind.coffee
This | |
is | |
sooo | |
annoying! |
View Preferences.sublime-settings
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
View err.sh
vampy_000@RAFAL /d/developer/angular-brunch-seed (master) | |
$ brunch w -s | |
06 May 14:58:15 - info: application started on http://localhost:3333/ | |
06 May 14:58:16 - error: Compiling of 'app\styles\app.less' failed. '/vendor/bootstrap-less-themes/themes/sapling/sticky-footer.less' wasn't found. | |
06 May 14:58:16 - error: Compiling of 'vendor\bootstrap\less\alerts.less' failed. NameError:variable @baseBorderRadius is undefined in 'vendor\bootstrap\less\alerts.less:15:17' | |
06 May 14:58:16 - error: Compiling of 'vendor\bootstrap\less\accordion.less' failed. NameError:variable @baseLineHeight is undefined in 'vendor\bootstrap\less\accordion.less:8:17' | |
06 May 14:58:16 - error: Compiling of 'vendor\bootstrap\less\button-groups.less' failed. NameError:.ie7-inline-block is undefined in 'vendor\bootstrap\less\button-groups.less:10:2' | |
06 May 14:58:16 - error: Compiling of 'vendor\bootstrap\less\breadcrumbs.less' failed. NameError:variable @baseBorderRadius is undefined in 'vendor\bootstrap\less\breadcrumbs.less:11:17' |
View jsbin.iyabax.coffee
App = -> | |
$debug = $ '#debug' | |
log = (t)-> $debug.html t | |
W = 400 | |
H = 300 | |
VIEW_ANGLE = 45 | |
ASPECT = W / H | |
NEAR = .1 |
OlderNewer