Skip to content

Instantly share code, notes, and snippets.

@clojens
clojens / project.clj
Last active September 15, 2020 11:56
Semantic grid in Clojure Garden DSL for CSS generation.
(defproject gridsystem "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.5"]
[garden "1.0.0-SNAPSHOT"]
[ring/ring-jetty-adapter "0.2.5"]
[hiccup "1.0.4"]]
:plugins [[lein-ring "0.8.5"]]
:ring {:handler semantic-gs.handler/app}
:profiles
{:dev {:dependencies [[ring-mock "0.1.5"]]}})
@espeed
espeed / binary16-uuid.clj
Last active July 3, 2024 02:09
Random UUID compressed into a Binary 16 byte array in Clojure.
;; Random UUID compressed into a Binary 16 byte array in Clojure.
;; by James Thornton, http://jamesthornton.com
(ns espeed.uuid
(require [clojure.data.codec.base64 :as b64]))
(defn uuid4 [] (java.util.UUID/randomUUID))
(defn uuid-as-byte-array []
@timgluz
timgluz / ajax_example.cljs
Created May 27, 2013 20:18
Simple ajax with closure.browser.net
(ns foxyeye.search
(:use-macros [dommy.macros :only [sel sel1]])
(:require [clojure.browser.event :as gevent]
[clojure.browser.net :as net]
[dommy.core :as dommy]
[clojure.string :as string]))
;; example template
(deftemplate search-result-item-template [item]
[:li
@lancelet
lancelet / .emacs
Last active December 17, 2015 11:29
NOTE: This now has its own repository: https://github.com/lancelet/dotemacs Yes, it's sad, I know. My .emacs file. It comes with an accompanying shell script which sets up the ~/.emacs.d/vendor directory with required additions. This isn't guaranteed to work for anyone but me.
;---------------------------------------;
; JONATHAN MERRITT'S EMACS STARTUP FILE ;
;---------------------------------------;
; Setup:
;
; 1. Create vendor directory:
; > mkdir -p ~/.emacs.d/vendor
;
; 2. Install milkypostman/powerline (cute status bar / modeline):
; > cd ~/.emacs.d/vendor
@owainlewis
owainlewis / hipchat.el
Created May 8, 2013 10:58
HipChat Jabber Emacs
;; HipChat
(setq ssl-program-name "gnutls-cli"
ssl-program-arguments '("--insecure" "-p" service host)
ssl-certificate-verification-policy 1)
;; Connect using jabber.el
;; M-x jabber-connect <RET>
;; Config
@jefflasslett
jefflasslett / xmonad.hs
Created April 11, 2013 04:21
xmonad.hs (xmonad config) to provide swiping touch screen to cycle workspaces. Clicks (taps) don't reach app though.
import XMonad
import XMonad.Hooks.ManageDocks
import XMonad.Util.EZConfig
import XMonad.Actions.MouseGestures
import XMonad.Actions.CycleWS
import XMonad.Actions.SpawnOn
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myManageHook = composeAll
@zmaril
zmaril / softwarehelpskill.md
Last active August 3, 2021 04:52
I want to write software that helps kill people.

I want to write software that helps kill people.

Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.

@mbauhardt
mbauhardt / init.el
Created March 24, 2013 17:33
my emacs el file to setup erc with ssl
(require 'erc-services)
(erc-services-mode 1)
(eval-after-load "erc"
'(progn
(setq erc-prompt-for-nickserv-password "")))
;; Set autoconnect networks
@xeqi
xeqi / pallet.clj
Last active December 14, 2015 23:39
immutant and pallet
(require
'[pallet.crate.git :refer [git clone]]
'[pallet.crate.java :refer [java]]
'[pallet.crate.lein :refer [lein leiningen]])
(def repo "git://github.com/jcrossley3/random-apps-of-kindness.git")
(def demo-directory "random-apps-of-kindness/demo")
(defplan setup-machine
@bendlas
bendlas / predicate.clj
Created February 13, 2013 07:00
This file is not part of the cljs port as of yet, but a tidbit from my enlive cleanup effort It shows how to implement CSS3 operations in terms of zippers, in that form it should be trivial to adapt to the DOM it's basically the predicates library from enlive, but lifted to a zipper level, so that it can work generically
(ns workbench.enlive.predicate
(:require
[clojure.zip :as z]
[workbench.enlive.engine
:refer [compile-step]]
[workbench.enlive.select
:refer [zip-select]]))
;; ## Builtin predicates
;;