Skip to content

Instantly share code, notes, and snippets.

@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

hiredman [6:39 PM]

I just don't understand why people use mount, I must be missing something, its model of each namespace as a component, with state as a global thing in a namespace(maybe I am mistunderstanding this), just seems bad, like sticking (def state (atom {})) in every namespace would be

[6:41] https://github.com/tolitius/mount/blob/master/src/mount/core.cljc#L10-L14

GitHub tolitius/mount mount - managing Clojure and ClojureScript app state since (reset)

@pandeiro
pandeiro / README.md
Last active June 2, 2020 08:02
Example of a simple webapp written as a single file

Instructions

  1. Get Boot
  2. Copy the above file to $HOME/app.boot
  3. $ chmod a+x $HOME/app.boot
  4. $ cd && ./app.boot
@pandeiro
pandeiro / clojurescript.plus.js
Last active May 2, 2020 02:28
A pre-compiled, batteries-included ClojureScript runtime file in vanilla JavaScript for development purposes.
This file has been truncated, but you can view the full file.
/**
* clojurescript.plus.js: pre-compiled ClojureScript runtime + some libs
*
* ClojureScript version: 0.0-1889
*
* Includes the following namespaces:
* - clojure.string, clojure.set, clojure.walk, clojure.zip, clojure.browser.repl
* - cljs.core.async, cljs.core.async.macros
* - jayq.core
* - crate.core
@pandeiro
pandeiro / xhr.cljs
Created September 6, 2012 03:22
Experimental ClojureScript XHR API
(ns please.core
(:require [please.help :as help]
[cljs.reader :as reader])
(:refer-clojure :exclude [get])) ; please?
;;
;; Event handler delegation
;;
(def ^{:doc "If this is nil, no events will be sent. Use please.core/set-request-event-fn! to
change this value"}
@pandeiro
pandeiro / change.clj
Created March 4, 2017 00:08
Renders coins and headaches
;; This buffer is for Clojure experiments and evaluation.
;; Press C-j to evaluate the last expression.
;; Hey Sameer, thanks again for taking the time today. I'm afraid my
;; solution is gonna be a little disappointing; nonetheless I wanted
;; to share it.
;; The algorithm I wanted to write was: for each coin, there is a
;; positive sequence of values that represent c0, c1 ... cn where n
;; cannot be greater than the value of the change targeted. Iterating
@pandeiro
pandeiro / quick-clojure.el
Last active February 3, 2017 23:57
An elisp snippet for quickly getting Clojure and tooling support into Emacs
;;
;; Evaluate the form below or add it to your Emacs initialization file
;; to add Clojure support to Emacs.
;;
;; Required system dependencies:
;; - JDK 1.7+
;; - wget
;;
(let* ((github-url "https://raw.githubusercontent.com/")
(lein-url (concat github-url "technomancy/leiningen/stable/bin/lein"))
gistup
@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>
@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"],