Skip to content

Instantly share code, notes, and snippets.

View myguidingstar-zz's full-sized avatar

Hoàng Minh Thắng myguidingstar-zz

View GitHub Profile
@myguidingstar-zz
myguidingstar-zz / .md
Created September 1, 2016 04:04 — forked from joepie91/.md
NixOS notes

Some stuff I've had to figure out that wasn't documented...

Proprietary AMD drivers (fglrx)

If you get this error:

/tmp/nix-build-ati-drivers-15.7-4.4.18.drv-0/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:194:22: fatal error: asm/i387.h: No such file or directory
@myguidingstar-zz
myguidingstar-zz / deps
Created July 3, 2016 15:44
Use Rum with Javeline
[hoplon/javelin "3.8.4"]
[rum "0.9.1"]
! ### Development/debug tips
! `xev` and `showkey` to see which keycode is pressed
! find information of old keys
! `xmodmap -pke |grep Something`
! Fastest way to get Unicode number out of Unicode chars
! - in Python repl:
! >>> myChars=u'≈°⋆³≡≠'
! `xev` and `showkey` to see which keycode is pressed
!old keys
!xmodmap -pke |grep Something
!Double Shift makes Caps_Lock
keycode 50 = Shift_L Caps_Lock Shift_L Caps_Lock
keycode 62 = Shift_R Caps_Lock Shift_R Caps_Lock
! former Tab
keycode 23 = BackSpace
A monad tutorial for Clojure programmers (part 1)
Filed under: Libraries — khinsen @ 6:15 pm
Monads in functional programming are most often associated with the Haskell language, where they play a central role in I/O and have found numerous other uses. Most introductions to monads are currently written for Haskell programmers. However, monads can be used with any functional language, even languages quite different from Haskell. Here I want to explain monads in the context of Clojure, a modern Lisp dialect with strong support for functional programming. A monad implementation for Clojure is available in the library clojure.contrib.monads. Before trying out the examples given in this tutorial, type (use 'clojure.contrib.monads) into your Clojure REPL.
Monads are about composing computational steps into a bigger multi-step computation. Let’s start with the simplest monad, known as the identity monad in the Haskell world. It’s actually built into the Clojure language, and you have certainly used it: it’s the le

Labeling React-based libraries

Facebook's React javascript library has recently got a lot of interest from Clojure community. Everyone is talking about it. There are many Clojurescript wrapper implementation out there, one by one even confuse newbies more about which library should they choose.

Looking at Reactjs directly doesn't help. Facebook brings PHP's scary "model, view and controller - all in a single line of code" with their JSX syntax. And the style adopted by the major of Javascript community

#!/usr/bin/python
words = ['SEM',
'MVP',
'pop',
'DRM',
'ROI',
'DNA',
'SEO',
'flat',
(ns cljs.repl.foxx
(:require [clojure.string :as string]
[clojure.java.io :as io]
[cljs.analyzer :as ana]
[cljs.repl :as repl]
[cljs.env :as env]
[clj-http.client :as client]
[cheshire.core :refer [parse-string]]
[cemerick.piggieback :as piggieback])
(:import cljs.repl.IJavaScriptEnv))