This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns reduxish.state-tools | |
(:require-macros [cljs.core.async.macros :refer [go go-loop]]) | |
(:require [cljs.core.async.impl.protocols :refer [WritePort ReadPort]] | |
[cljs.core.async :refer [<!]])) | |
(defn channel? [ch] | |
(and (satisfies? WritePort ch) (satisfies? ReadPort ch))) | |
(defn dispatch! [reducer state value] | |
(println value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Bad example to debug :D</title> | |
<style> | |
.colors .colorBlock { | |
display: inline-block; | |
width: 1em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn get-clipboard [] | |
(.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))) | |
(defn slurp-clipboard [] | |
(if-let [contents (.getContents (get-clipboard) nil)] | |
(.getTransferData contents java.awt.datatransfer.DataFlavor/stringFlavor))) | |
(defn spit-clipboard [text] | |
(.setContents (get-clipboard) (java.awt.datatransfer.StringSelection. text) nil)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▶ brew list -1 | while read line; do brew unlink $line; brew link $line; done | |
Unlinking /usr/local/Cellar/appledoc/2.2... 0 links removed | |
Linking /usr/local/Cellar/appledoc/2.2... 1 symlinks created | |
Unlinking /usr/local/Cellar/autoconf/2.69... 0 links removed | |
Linking /usr/local/Cellar/autoconf/2.69... 18 symlinks created | |
Unlinking /usr/local/Cellar/bash-completion/1.3... 184 links removed | |
Linking /usr/local/Cellar/bash-completion/1.3... 182 symlinks created | |
Unlinking /usr/local/Cellar/bgrep/0.2... 0 links removed | |
Linking /usr/local/Cellar/bgrep/0.2... 1 symlinks created | |
Unlinking /usr/local/Cellar/binutils/2.24... 49 links removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Draggable</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author: Luis Saffie <[email protected]> | |
#url: www.saffie.ca | |
#twitter: lsaffie | |
# | |
#tmux1.8 has some great features. One of them is pane zooming.. | |
#http://blog.sanctum.geek.nz/zooming-tmux-panes/ | |
#however, tmux 1.8 depends on libevent2 which does not come with 10.04 | |
#solution: build from scratch! | |
#NOTE: LDFLAGS is used to build tmux because for some reason it can't find the ld_libs from libevent2.. Everything done by this script is legit thought... | |
#USAGE: wget https://gist.github.com/lsaffie/6335957/raw/tmux18-ubuntu-10-04 |bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
imagemin = require('gulp-imagemin'), | |
rename = require('gulp-rename'), | |
clean = require('gulp-clean'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('itemFactory', function () { | |
function Item() { | |
this.value = Math.ceil(Math.random() * 1000); | |
}; | |
return Item; | |
}); | |
define('firstView', ['factory!itemFactory'], function (item) { | |
console.log('First view; ' + JSON.stringify(item)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $HOME/local/*; do | |
[ -d $i/bin ] && PATH="${i}/bin:${PATH}" | |
[ -d $i/sbin ] && PATH="${i}/sbin:${PATH}" | |
[ -d $i/include ] && CPATH="${i}/include:${CPATH}" | |
[ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}" | |
[ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}" | |
# uncomment the following if you use macintosh | |
# [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}" | |
[ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}" | |
[ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}" |
NewerOlder