Skip to content

Instantly share code, notes, and snippets.

View gabriel-laddel's full-sized avatar

Gabriel Laddel gabriel-laddel

View GitHub Profile
1) Download emacs 24.x
2) Start emacs
3) hit 'C-h i', where 'C' stands for 'control' and then 'Shift-6' until
you hit the top level of the info nodes - which will look like this:
```
File: dir, Node: Top This is the top of the INFO tree
@gabriel-laddel
gabriel-laddel / gist:7694998
Last active December 29, 2015 16:08
#Emacs hack for sane `rgrep' of #clojure library sources
;;; TODO, Thu Nov 28 2013, Francis Wolke
;;; Should this clear out the newly created files from the directory when finished with the grep process?
(defadvice rgrep
(before decompress-jars first (regexp &optional files dir confirm))
"Decompresses all jars in specifed directory in a synchronous manner. Use with
`rgrep' so that you can search clojure library sources with (almost) the same
ease that you can search Common Lisp sources."
(shell-command-to-string
(concat "cd " dir " && for f in *.jar; do jar -xf $f; done")))
(defn m->ds
"Accepts a hashmap, which is then converted into its destructuring syntax."
[m]
(loop [ks (keys m)
acc {}]
(if (empty? ks)
acc
(recur (rest ks)
(let [fk (first ks)
v (get m fk)
(defroutes app-routes
;; wrap everything under /api endpoint
(context "/api" [] (defroutes api-routes
(context "/users" [] (defroutes user-routes
(POST "/" {body :body} (create-new-user body))
(context "/profile" [] (defroutes profile-routes
(GET "/" [] (get-user-profile)) ; for logged in user
(GET "/:id" [id] (get-user-profile id))
I found pircetam to be a beneficial substance, though the effects vary from person to person.
Positive effects
----------------
easier to focus
music sounds really good
heightened senses
mental clarity
Negative effects
;;; elisp-functions.el -- Functions used to script lessons
;;; Copyright (C) 2013, Francis Wolke
; Sets up websocket connection to local server and defines a list of primitives
; used to control the emacs experience.
(require 'websocket)
(require 'defn)
;; (custom-set-variables
;; '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold])
;; '(ansi-color-names-vector ["#0a2832" "#c60007" "#728a05" "#a57705" "#2075c7" "#c61b6e" "#259185" "#52676f"])
;; '(background-color "#042028")
;; '(background-mode dark)
;; '(cursor-color "#708183")
;; '(custom-enabled-themes nil)
;; '(custom-safe-themes (quote ("1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" "4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" default)))
;; '(fci-rule-color "
To begin with, the web is a terrible implementation of a great idea - no one wants to mess with HTML, CSS, and javascript. All anyone wants to do is run code on your machine.[Quote Alan Kay here]
However, instead of having a well designed/engineered security model that will allow foreign code to run on my box, we are (as a society) attempting to hack our way out of it. See NaCL (native client), web workers, asm.js or WebGL for examples. Well if thats what we want to do lets' stop beating around the bush and get down to it.
This is the first thing that bothers me.
The second thing is that back in the day we had Lisp machines. The problems arn't insoluble. From what I've read online, you could modify any code on the box, and incrementally recompile it. That is the machine I want to program for. Currently whenever I want to do something on UNIX I have to learn a new syntax for a tool, which makes it really difficult to get anything of consequence done without someone who 'knows unix'. This poor
Let's talk about google glass,
Even here in silly valley, supposedly the most technologically advanced
place in the world people I meet on a daily basis are TERRIFIED about
possibility everyone (or even a large minority of people) having google
glass.
I don't understand this viewpoint - it seems to me that this
technology will make our world a MUCH safer place. Take, for example the
following video:
Common Lisp is a big-city language. Spit out the hayseed,
pronounce "shit" with one syllable and "shotgun" with two.
You're not in Kansas, anymore. C is the language of the poor
farmer village where the allocation of every seed and livestock
matters, where taxes are low and public service
non-existent. Appreciating the value of a large language is
evidently hard for many people, just like many people find
themselves miserable in the big city and go to great lengths to
create a small village for themselves in the city where
everything is like it used to be where they came from. Common