Skip to content

Instantly share code, notes, and snippets.

(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))
(defprotocol ITest (test [x] [x y]))
(defrecord Fails []
ITest
(test
([x] (str x))
([x y] (str x y))))
(defrecord Works []
ITest
--- 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
(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)))
" Global vim settings
" NeoBundle {{{
if has('vim_starting')
set nocompatible
filetype off
set rtp+=~/.vim/bundle/neobundle.vim/
endif
#!/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:
(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."
# 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')
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'
" Clojure
NeoBundle 'vim-scripts/paredit.vim'
NeoBundle 'tpope/vim-fireplace'
NeoBundle 'tpope/vim-leiningen'
NeoBundle 'guns/vim-clojure-highlight'
NeoBundle 'guns/vim-clojure-static'