Skip to content

Instantly share code, notes, and snippets.

View ccjoel's full-sized avatar
🌀
REPL'ing

Joel Quiles ccjoel

🌀
REPL'ing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ccjoel on github.
  • I am teh0xqb (https://keybase.io/teh0xqb) on keybase.
  • I have a public key ASDdzBuDy8cPsxixtA1Q6pRl2_mbG-bqfEjopW48iCW9cgo

To claim this, I am signing this object:

@ccjoel
ccjoel / init.el
Created April 15, 2020 16:35 — forked from mowat27/init.el
Emacs config for clojure + cider + paredit + auto-complete
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(defvar my-packages '(clojure-mode
cider
paredit
auto-complete
highlight-parentheses

Keybase proof

I hereby claim:

  • I am teh0xqb on github.
  • I am teh0xqb (https://keybase.io/teh0xqb) on keybase.
  • I have a public key ASC1Uy_l2PLf4Tom6iKMrusZ0MfrTCYsWY2BGS9PgkHvhQo

To claim this, I am signing this object:

@ccjoel
ccjoel / react-example.js
Created June 23, 2019 22:43
react examples for a friend
/** Assume database returns data for tasks, we may
* model each task as an object, and use React for the view.
**/
/**
* Simple component that accepts data for a task, and returns markup for it
**/
function Task({name, finished, reminderDateTime, dueDate}) {
return (
<fieldset>
@ccjoel
ccjoel / gist:eb7dcd892805006b2db1567f4f0df1d3
Created May 2, 2019 20:19 — forked from aphyr/gist:3200862
Clojure message passing test
(ns messagepassing.core)
(import [java.util.concurrent LinkedTransferQueue])
(def m 10000000)
(defn queue-test []
(defn bounce [in out m]
(let [value (.take in)]
(if (< value m)
(do
@ccjoel
ccjoel / ants.clj
Created March 26, 2017 17:30 — forked from michiakig/ants.clj
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world
@ccjoel
ccjoel / web-man-pages.sh
Created February 23, 2017 20:57
Manpages fallback quick demo
# Curl online manpages and pipe to less
webman () {
curl http://man.he.net/\?topic\=$1\&section\=all | less
}
# Calls man pages or fallbacks to webman
man()
{
echo "Fetching man page for $1 ..."
@ccjoel
ccjoel / very_telling.sh
Created February 13, 2017 15:17
Finding funny notes, code that saddens me, and silly occurrences on code base and open source libraries
sudo fgrep --exclude=\*.{db,json,so,jar,sig,log,md,edn,patch,class,css,scssc} --exclude-dir=".git" -rnw "." -e "hammer" -e "dragon" -e "plz" -e "crazy" -e "dont look here" -e "please ignore" -e "horrible" -e "horrid" -e "hideous" -e "nonsense" -e "fack" -e "hack" / 2>&1 | tee -a very-telling.txt
@ccjoel
ccjoel / jsx_switch.js
Created August 3, 2016 16:18
JSX Switch Statement?
render(){
const { flashState } = this.props;
return ({
({ // switch
SUCCESS: () => (<Component1 />),
INFO: () => (<Component2 />),
WARNING: () => (<Component3 />) }[flashState] ||
(() => (<DefaultComponent />)))() // DEFAULT
});