This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- generate-uuid [] | |
(let [pattern "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" | |
time-api (or js/performance js/Date) | |
now (atom (.now time-api))] | |
(replace pattern #"[xy]" (fn [char] | |
(let [r (-> (rand) | |
(* 16) | |
(+ @now) | |
(rem 16) | |
(int)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol ITest (test [x] [x y])) | |
(defrecord Fails [] | |
ITest | |
(test | |
([x] (str x)) | |
([x y] (str x y)))) | |
(defrecord Works [] | |
ITest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- TLP 0.7 -------------------------------------------- | |
+++ Configured Settings: /etc/default/tlp | |
TLP_ENABLE=1 | |
DISK_IDLE_SECS_ON_AC=0 | |
DISK_IDLE_SECS_ON_BAT=2 | |
MAX_LOST_WORK_SECS_ON_AC=15 | |
MAX_LOST_WORK_SECS_ON_BAT=60 | |
CPU_SCALING_GOVERNOR_ON_AC=performance | |
CPU_SCALING_GOVERNOR_ON_BAT=ondemand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defrecord OneShotThing [with some fields]) | |
(defn do-other-stuff [{:keys [with some fields]}] (str with some fields)) | |
(defn do-stuff [thing] (println "do-stuff" (do-other-stuff thing))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Global vim settings | |
" NeoBundle {{{ | |
if has('vim_starting') | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/neobundle.vim/ | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import sys | |
from neovim import attach | |
try: | |
#nvim = attach('socket', host='127.0.0.1', port='6666') | |
nvim = attach('socket', path='/tmp/figwheel') | |
nvim.command('edit ' + sys.argv[1]) | |
nvim.command(sys.argv[2]) | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns diamonds.core | |
(:require [clojure.string :refer [upper-case]])) | |
(defn- repeat-space [n] | |
"Returns a string of n spaces" | |
(apply str (take n (repeat " ")))) | |
(defn- ping-pong [n] | |
"Returns a sequence of numbers from 0 to n and back to 0." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Lubosz Sarnecki <lubosz@gmail.com> | |
# Original Package: Vítor Ferreira <vitor.dominor@gmail.com> | |
pkgname=xboxdrv-git | |
pkgver=0.9.0.1433.6b540db | |
pkgrel=1 | |
pkgdesc="An XBox/XBox 360 gamepad driver - as alternative to the xpad-kernel module - with more configurability, runs in userspace and supports a multitude of controllers" | |
arch=('i686' 'x86_64') | |
url="http://pingus.seul.org/~grumbel/xboxdrv/" | |
license=('GPL3') | |
depends=('libx11' 'dbus-glib' 'libusbx') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index e48d714..3222fbc 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -23,6 +23,9 @@ depends=('desktop-file-utils' | |
'libpng12' | |
'libxtst' | |
'monodevelop') | |
+makedepends=('elinks' | |
+ 'sed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Clojure | |
NeoBundle 'vim-scripts/paredit.vim' | |
NeoBundle 'tpope/vim-fireplace' | |
NeoBundle 'tpope/vim-leiningen' | |
NeoBundle 'guns/vim-clojure-highlight' | |
NeoBundle 'guns/vim-clojure-static' |