Skip to content

Instantly share code, notes, and snippets.

angular.module('reveal.directives', [])
.directive('zurbReveal', function($revealService, $log){
return {
restrict: 'A',
link: function postLink(scope, element, attrs) {
scope.$watch(attrs.zurbReveal, function(url){
if(typeof(url)=='undefined') url = attrs.zurbReveal;
element.bind( "click", function(){
scope.$emit("event:modal-request", url, scope, attrs.revealOptions);
});
@TigorC
TigorC / gist:3787759
Created September 26, 2012 12:32
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@TigorC
TigorC / tastypie_resource.py
Created July 18, 2012 10:29
Example of a custom django-tastypie Resource
from tastypie import fields
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from tastypie.bundle import Bundle
from tastypie.exceptions import NotFound
from tastypie.resources import Resource
# a dummy class representing a row of data
class Row(object):