Clone the xcape repo, install its dependencies:
yum install gcc make libX11-devel libXtst-devel libXi-devel
then make
, and move xcape
to /usr/local/bin
.
Create/Edit /etc/gdm/PostLogin/Default
, with the minimum content of:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
<svg | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:cc="http://creativecommons.org/ns#" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:svg="http://www.w3.org/2000/svg" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Programmer's Shift Keys</name> | |
<!-- | |
Author: Carwin Young (@carwin) | |
Edited by Simon Welker (@chipf0rk) | |
Last Updated: 2015-02-18 | |
v.1.2 | |
Clone the xcape repo, install its dependencies:
yum install gcc make libX11-devel libXtst-devel libXi-devel
then make
, and move xcape
to /usr/local/bin
.
Create/Edit /etc/gdm/PostLogin/Default
, with the minimum content of:
# Colors!
export TERM=xterm-256color
(defn rng [conf] | |
(let [{:keys [a b m]} conf] | |
(fn [x] | |
(mod (+ (* a x) b) m)))) | |
(defn recurredly [f seed] | |
(lazy-seq | |
(let [res (f seed)] | |
(cons res | |
(recurredly f res))))) |
;; A small macro that enables if-else syntax without explicit do-blocks. | |
;; Example usage: | |
(comment | |
(do-if (= slang :british) | |
(println "oh bloody hell mate") | |
:posh-face | |
:else | |
(println "f*** dude") | |
:angry-face)) |
// An (admittedly silly) demonstration of how optional chains in Swift | |
// are equivalent to flatMapping over each optional. | |
// | |
// You can, in your mind, replace every `?.x` by a `flatMap { $0.x }` call. | |
class Peel { | |
var color: String | |
init(color: String) { self.color = color } | |
} | |
class Banana { |
infix operator >>= { | |
associativity left | |
precedence 160 | |
} | |
func >>=<S: SequenceType, T>(source: S, transform: S.Generator.Element -> [T]) -> [T] { | |
return flatMap(source, transform) | |
} | |
func >>=<C : CollectionType, T>(source: C, transform: (C.Generator.Element) -> [T]) -> [T] { | |
return flatMap(source, transform) |
var rss_url = 'http://www.nasa.gov/rss/dyn/lg_image_of_the_day.rss'; | |
var directory = '?'; | |
var FeedParser = require('feedparser'), | |
request = require('request'), | |
fs = require('fs'), | |
path = require('path'); | |
var feedparser = new FeedParser(), | |
req = request(rss_url); |