Skip to content

Instantly share code, notes, and snippets.

@karls
karls / theme-cycling.el
Created November 29, 2015 12:41
Quick hack for cycling themes in Emacs
;; Theme cycling.
;; NOTE: themes have to exist somewhere on disk, e.g in ~/.emacs.d/themes/
;; Set it with (setq custom-theme-directory "~/.emacs.d/themes/")
(defvar current-theme-index 0)
(defvar theme-list
'(solarized-dark solarized-light)
"List of themes to cycle through.")
(defun get-theme-name (idx)
### Keybase proof
I hereby claim:
* I am karls on github.
* I am karls (https://keybase.io/karls) on keybase.
* I have a public key whose fingerprint is C26E 7741 E6E7 2AAD FAAA 99D9 E22A D0D2 17C8 87F4
To claim this, I am signing this object:
@karls
karls / map.html
Last active December 30, 2015 17:59
Kaardi installimine
<iframe src="http://www.mapplication.eu/partners/4e9c0562-0d66-11e3-a629-28cfe94c9e77" style="width:100%; height:750px; border:1px solid #999;" scrolling="no"></iframe>
@karls
karls / whine-machine.sh
Created March 20, 2012 21:18
This machine is willing to "listen" when you're feeling down
#!/usr/bin/env bash
while true; do
echo -n "Whine: "
read text
echo $text > /dev/null
done;
@karls
karls / svg-1.html
Created March 12, 2012 15:06
Another way to do masking with SVG
<!doctype html>
<html>
<head>
<title>SVG Test</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" height="400" width="400" viewBox="0 0 400 400">
@karls
karls / svg.html
Created March 12, 2012 13:48
SVG clipping example
<!doctype html>
<html>
<head>
<title>SVG Test</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" height="400" width="400" viewBox="0 0 400 400">
@karls
karls / swarm_opt.py
Created February 29, 2012 13:02 — forked from mossblaser/swarm_opt.py
Python Swarm Thingy
#!/usr/bin/python
import random
from math import sin, sqrt
################################################################################
# Function to minimise
################################################################################