Skip to content

Instantly share code, notes, and snippets.

@jdivock
jdivock / gist:ecb86168ef7d11d2c436
Created May 14, 2014 21:46
Tooltip directive, some day I'll bring you back to life old friend
'use strict';
angular.module('app.sell').directive('tooltip', function() {
return {
restrict: 'EA',
transclude: true,
scope: {
text: '@'
},
@jdivock
jdivock / gist:0829ca8b22e57e559601
Last active August 29, 2015 14:06
ClojureScript scratch
;; Anything you type in here will be executed
;; immediately with the results shown on the
;; right.
( #(conj %1 %2 %3) {"foo" "bar"} {"zub" "bub"} { "hi" "there"} )
( (fn [yep stuff] (conj yep stuff)) {"foo" "bar"} {"zub" "bub"} )
( #(* 2 %) 5)
@jdivock
jdivock / gist:405cf2201ae2b53e439c
Created September 14, 2014 19:22
React POC of loading makes for EP
/** @jsx React.DOM */
/* jshint ignore:start */
var Step1 = React.createClass({
// transferPropsTo() will take any props passed to CheckLink
// and copy them to <a>
handleMakeChange: function(makeValue) {
this.setState({
makeValue: makeValue
@jdivock
jdivock / fuckingDates.js
Created September 27, 2014 19:15
date fuckery
var times = { "Schedule": {
"2014-09-27T00:00:00": [
16
],
"2014-09-28T00:00:00": [
8,
9,
10,
11,
14
@jdivock
jdivock / home.bundle.js
Last active August 29, 2015 14:08
webpack + ng-annotate
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@jdivock
jdivock / pullall.sh
Created December 1, 2014 16:56
Git pullall
git config alias.pullall '!f(){ git pull "$@" && git submodule update --init --recursive; }; f'
@jdivock
jdivock / inheritance.js
Created December 7, 2014 12:35
inheritance example
// Code goes here
var Parent = function(foo1){
this.foo1 = foo1
}
Parent.prototype.derp = function(){
console.log('derp derp');
}
@jdivock
jdivock / .vimrc
Last active August 29, 2015 14:13
.vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'glidenote/newdayone.vim'
@jdivock
jdivock / clojure-ch4.clj
Created January 31, 2015 21:46
protocols and such
;; Anything you type in here will be executed
;; immediately with the results shown on the
;; right.
(import 'java.util.UUID)
(UUID/randomUUID)
(defn who-are-you [input]
(cond
@jdivock
jdivock / tea-async-test.clj
Created February 1, 2015 01:51
clojure async channels
(ns async-tea-party.core
(:require [clojure.core.async :as async])
)
(def tea-channel (async/chan 10))
(async/>!! tea-channel :cup-of-tea)
(async/<!! tea-channel)