Skip to content

Instantly share code, notes, and snippets.

View nissoh's full-sized avatar
🎯
Focusing

itburnz nissoh

🎯
Focusing
  • 2501
  • Sea of information
View GitHub Profile
@nissoh
nissoh / example.js
Created January 15, 2016 10:17 — forked from anaisbetts/example.js
Cool tricks with ES6 templated strings
import {p} from './get-path';
console.log(p`${'userDesktop'}/MyApp`);
// On Windows
>> C:\Users\TheUser\Desktop\MyApp
// On OS X
>> /Users/TheUser/Desktop/MyApp

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

_.extend Backbone.Validation.callbacks,
valid: (view, attr, selector) ->
control = view.$('[' + selector + '=' + attr + ']')
group = control.parents(".control-group")
group.removeClass("error")
if control.data("error-style") == "tooltip"
# CAUTION: calling tooltip("hide") on an uninitialized tooltip
# causes bootstraps tooltips to crash somehow...
control.tooltip "hide" if control.data("tooltip")
@nissoh
nissoh / animations.css
Created March 24, 2012 21:28 — forked from Twipped/animations.css
CSS3 Animation toolkit
.animated {
-webkit-animation: 1s ease;
-moz-animation: 1s ease;
-ms-animation: 1s ease;
-o-animation: 1s ease;
animation: 1s ease;
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
-o-animation-fill-mode: both;