Skip to content

Instantly share code, notes, and snippets.

View kirstein's full-sized avatar

Mikk Kirstein kirstein

View GitHub Profile
@kirstein
kirstein / throttle.js
Created May 30, 2013 19:03
Throttle events
function throttle(callback, throttleTimeout, throttleTicks) {
throttleTimeout = throttleTimeout || 50;
throttleTicks = throttleTicks || 20;
var tick = 0,
timeout;
return function() {
var args = arguments;
@kirstein
kirstein / angular.js
Created May 14, 2013 18:19
Angular ngValue test
/**
* @license AngularJS v1.1.5-65e54de
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////
@kirstein
kirstein / Gruntfile.js
Last active December 14, 2015 13:38
Gruntfile angular
module.exports = function( grunt ) {
'use strict';
grunt.initConfig({
// usemin config
// use the original index.html, as this the task which collect the files to compile
// relative to the index.html
useminPrepare: {
html: 'app/index.html'
},
@kirstein
kirstein / index.html
Created February 27, 2013 21:29
reveal.js template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
@kirstein
kirstein / Sublime preferences
Created February 16, 2013 20:26
Sublime user settings
{
"show_minimap": false,
"auto_complete": false,
"close_windows_when_empty": false,
"ensure_newline_at_eof_on_save": true,
"font_size": 14.0,
"bold_folder_labels": true,
"highlight_modified_tabs": true,
"spell_check": true,
"draw_white_space": "all",
@kirstein
kirstein / Undefined in js
Last active December 9, 2015 19:38
Undefined checks
# JavaScript undefined
> The cause of headaches.
> The bringer of tears.
> The destroyer of functions.
> The slayer of equations.
call pathogen#infect()
"" Remap leader
let mapleader = ","
"" Remat jj to esc
inoremap jj <ESC>
"" Use Vim settings, rather then Vi settings (much better!).
"" This must be first, because it changes other options as a side effect.