Skip to content

Instantly share code, notes, and snippets.

View Olical's full-sized avatar
🧙‍♂️
(magic)

Oliver Caldwell Olical

🧙‍♂️
(magic)
View GitHub Profile
@Olical
Olical / example.html
Created June 6, 2012 12:31
A 12 and 16 column CSS grid created in my generator: http://jsfiddle.net/Wolfy87/5nRrq/
<div class='row'>
<div class='span-12'>&nbsp;</div>
</div>
<div class='row'>
<div class='span-6'>&nbsp;</div>
<div class='span-6 last'>&nbsp;</div>
</div>
<div class='row'>
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html
// My fix: don't treat arguments as if it were an array
// (Use Array.prototype.slice.call() to convert it)
function stacktrace() {
function st2(f) {
return !f ? [] :
st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + Array.prototype.slice.call(f.arguments).join(',') + ')']);
}
return st2(arguments.callee.caller);
@hugooliveirad
hugooliveirad / connect-cljs.repl.md
Created October 8, 2015 13:01
Connect to ClojureScript Node nREPL

jack-in into normal Clojure nREPL. Run:

(require '[cljs.repl :as repl] '[cljs.repl.node :as node])

(compile 'cljs.repl.node)

(cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env))
@daveyarwood
daveyarwood / 00-conjure.edn
Last active November 21, 2019 03:03
Dave's setup for starting a prepl server in Boot projects
;; ~/.config/conjure/conjure.edn
{:conns
;; My `prepl-server` task spits out a `.socket-port` file when it starts a
;; prepl server. This configuration allows Conjure to find the prepl server
;; without needing to specify the port explicitly.
{:cwd {:port #slurp-edn ".socket-port"}}}
@daveyarwood
daveyarwood / 00-home-dir-conjure.edn
Last active February 5, 2020 17:22
Dave's setup for starting a prepl server in tools.deps projects
;; ~/.config/conjure/conjure.edn
{:conns
;; My `clj -Aprepl-server` alias spits out a `.socket-port` file when it starts
;; a prepl server. This configuration allows Conjure to find the prepl server
;; without needing to specify the port explicitly.
{:cwd {:port #slurp-edn ".socket-port"}}}
@pesterhazy
pesterhazy / select.cljs
Last active December 10, 2022 03:17
Using react-select with reagent
;; in your project definition
;; [cljsjs/react-select "1.0.0-rc.1" :exclusions [cljsjs/react]]
;; See react-select documentation: https://github.com/JedWatson/react-select
(ns example.select
(:require [reagent.core :as r]
[cljsjs.react-select]))
(defn select
@jezen
jezen / Io Example Problems
Created December 15, 2013 13:17
The example problems have gone missing from the Io language website, so here’s a backup.
#Sample code
#Hello world
"Hello world!" print
#Factorial
factorial := method(n, if(n == 1, 1, n * factorial(n - 1)))
99 bottles of beer
@jlesquembre
jlesquembre / shell.nix
Created August 26, 2020 08:57
Neovim + conjure shell.nix
# Usage:
# nix-shell --command nvim
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/b9ba82ef8ad6d8997840332ca3a2986e360291e3.tar.gz") { } }:
let
myNeovim = pkgs.neovim.override {
configure = {
customRC = ''
" here your custom configuration goes!
set termguicolors
@tim-smart
tim-smart / ctags definitions for Javascript
Created October 2, 2009 00:07
CTags Definitions for Javascript
--langdef=js
--langmap=js:.js
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/,object/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/,function/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/,array/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/,string/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/,boolean/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/,number/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/,variable/
--regex-js=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*[ \t]*([,;]|$)/\5/,variable/