Skip to content

Instantly share code, notes, and snippets.

@pandeiro
pandeiro / AppComponent.cjsx
Created April 4, 2016 20:17 — forked from bensmithett/AppComponent.cjsx
The world's tiniest guide to getting started with React, JSX, CoffeeScript & Webpack
React = require("react")
VideoPlayerComponent = require("components/VideoPlayerComponent")
AppComponent = React.createClass
# Need to add this manually if you want it to show up in React Chrome Dev Tools
# See https://github.com/jsdf/coffee-react-transform/issues/16
displayName: "AppComponent"
render: ->
<div>
(defn define-node-repl-launcher []
(fn [handler]
(fn [fileset]
(defn node-repl []
(require 'cemerick.piggieback 'cljs.repl.node)
((resolve 'cemerick.piggieback/cljs-repl)
:repl-env ((resolve 'cljs.repl.node/repl-env))
:output-dir ".noderepl"
:optimizations :none
:cache-analysis true
@pandeiro
pandeiro / index.html
Last active December 21, 2015 19:39 — forked from tilomitra/index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.2.1/pure-min.css">
<style>
.pure-g,
.pure-g-r {
/* font-family: "Bitstream Charter", Tinos, "Droid Sans", "Dejavu Sans", Helvetica, Arial, sans-serif; */
}
.pure-g [class *= "pure-u"],
@pandeiro
pandeiro / alephNoir.clj
Created January 3, 2012 21:53 — forked from ibdknox/alephNoir.clj
aleph and noir
(require '[noir.server :as server])
(use 'noir.core 'aleph.http 'lamina.core)
(defn async-response [response-channel request]
(enqueue response-channel
{:status 200
:headers {"content-type" "text/plain"}
:body "async response"}))
(defpage "/" [] "hey from Noir!")
@pandeiro
pandeiro / 0main.md
Created January 2, 2012 22:49 — forked from SethRobertson/index.md
Git Best Practices

Git Best Practices

This is a fairly common question, and there isn't a One True Answer, but still, this represents a consensus from #git

Read about git

Knowing where to look is half the battle. I strongly urge everyone to read (and support) the Pro Git book. The other resources are highly

(defn take-randnth [num coll]
(take num
(rest
(map first
(iterate (fn [[ret items]]
(let [idx (rand-int (count items))]
[(items idx)
(subvec (assoc items idx (items 0))
1)]))
[nil