Skip to content

Instantly share code, notes, and snippets.

View hkjels's full-sized avatar

Henrik Kjerringvåg hkjels

View GitHub Profile
@hkjels
hkjels / color-picker.el
Last active March 21, 2022 09:28 — forked from a3ammar/color-picker
Use OS X Color Picker in Emacs
(defun custom-color--choose-action (widget &optional _event) ; this function is only needed if you want to use color-picker in Easy Customization
"customize `widget-color--chose-action' to not split the screen"
(list-colors-display
nil nil
`(lambda (color)
(when (buffer-live-p ,(current-buffer))
(widget-value-set ',(widget-get widget :parent) color)
(pop-to-buffer ,(current-buffer))))))
(defun nscolor2hex (color)
@hkjels
hkjels / datomic-queries.clj
Created December 3, 2015 08:33 — forked from fabioyamate/datomic-queries.clj
Datomic Queries cheat-sheet
;;; Replace entity with the schema
{:find [...]
:in [...]
:where [...]}
;;; eav
[?e ?a ?v ?tx]
;;; txInstant
@hkjels
hkjels / index.html
Last active August 29, 2015 14:27
Clustered Force Layout
<!DOCTYPE html>
<meta charset="utf-8">
<style>
circle {
stroke: #fff;
}
</style>
<body>
@hkjels
hkjels / accounts.clj
Last active August 29, 2015 14:12 — forked from pelle/accounts.clj
(use '[datomic.api :only [q db] :as d])
(def uri "datomic:mem://accounts")
;; create database
(d/create-database uri)
;; connect to database
(def conn (d/connect uri))
@hkjels
hkjels / README.md
Created March 6, 2014 07:08 — forked from mbostock/.block

A recreation in SVG of the pleasing gradient in the background of the Stripe: Checkout page.

@hkjels
hkjels / mono.rb
Last active December 28, 2015 09:49 — forked from shtirlic/mono.rb
# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class Mono < Formula
url 'http://download.mono-project.com/sources/mono/mono-3.2.0.tar.bz2'
sha1 '23268df312906ff7f58f15b11bb030e323cde822'
homepage 'http://www.mono-project.com/'
/**
*/
config = require('yaml').eval(
require('fs')
.readFileSync(process.env['HOME'] + '/.clickatell.yml')
.toString('utf-8')
);
var clickatell = require("../lib/clickatell.js");
clickatell = new clickatell(config)