Skip to content

Instantly share code, notes, and snippets.

Avatar
❤️
Clojure/Script && JavaScript

Joel Quiles teh0xqb

❤️
Clojure/Script && JavaScript
View GitHub Profile
@teh0xqb
teh0xqb / init.el
Created Apr 15, 2020 — forked from mowat27/init.el
Emacs config for clojure + cider + paredit + auto-complete
View init.el
(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
View keybase.md

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:

@teh0xqb
teh0xqb / react-example.js
Created Jun 23, 2019
react examples for a friend
View react-example.js
/** 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>
@teh0xqb
teh0xqb / gist:eb7dcd892805006b2db1567f4f0df1d3
Created May 2, 2019 — forked from aphyr/gist:3200862
Clojure message passing test
View gist:eb7dcd892805006b2db1567f4f0df1d3
(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
@teh0xqb
teh0xqb / ants.clj
Created Mar 26, 2017 — forked from michiakig/ants.clj
Clojure ant sim from Rich Hickey
View ants.clj
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 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
@teh0xqb
teh0xqb / web-man-pages.sh
Created Feb 23, 2017
Manpages fallback quick demo
View web-man-pages.sh
# 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 ..."
@teh0xqb
teh0xqb / very_telling.sh
Created Feb 13, 2017
Finding funny notes, code that saddens me, and silly occurrences on code base and open source libraries
View very_telling.sh
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
@teh0xqb
teh0xqb / jsx_switch.js
Created Aug 3, 2016
JSX Switch Statement?
View jsx_switch.js
render(){
const { flashState } = this.props;
return ({
({ // switch
SUCCESS: () => (<Component1 />),
INFO: () => (<Component2 />),
WARNING: () => (<Component3 />) }[flashState] ||
(() => (<DefaultComponent />)))() // DEFAULT
});