start new:
tmux
start new with session name:
tmux new -s myname
set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt" | |
set thingsToDoFile to (open for access file thePath with write permission) | |
set eof of thingsToDoFile to 0 | |
set cr to ASCII character 10 | |
tell application "Things" | |
-- Export to-dos from Inbox | |
write "Inbox:" & return to thingsToDoFile as «class utf8» | |
repeat with td in to dos of list "Inbox" |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
(defn md5 | |
"Generate a md5 checksum for the given string" | |
[token] | |
(let [hash-bytes | |
(doto (java.security.MessageDigest/getInstance "MD5") | |
(.reset) | |
(.update (.getBytes token)))] | |
(.toString | |
(new java.math.BigInteger 1 (.digest hash-bytes)) ; Positive and the size of the number | |
16))) ; Use base16 i.e. hex |
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm | |
# Install Java |
#!/usr/bin/perl | |
# Emacs starter for Emacs mac port | |
# Thanks to Aquamacs Project and David Reitter | |
my $args = ""; | |
my $tmpfiles = ""; | |
for my $f (@ARGV) { |
import org.apache.commons.codec.binary.Base64 | |
val base64 = "data:([a-z]+);base64,(.*)".r | |
def decodeBase64 (src: String): Option[(String, Array[Byte])] = { | |
src match { | |
case base64(mimetype, data) => Some( (mimetype, Base64.decodeBase64(data.getBytes("utf-8"))) ) | |
case _ => None | |
} | |
} |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
(ns util.redis | |
(:refer-clojure :exclude [memoize]) | |
(:require [taoensso.carmine :as car])) | |
;; boilerplate stuff that is not in Carmine | |
(def ^:dynamic ^:private *pool*) | |
(def ^:dynamic ^:private *spec*) | |
(defmacro with-redis |
package code.model | |
import scala.xml._ | |
import net.liftweb.util._ | |
import net.liftweb.common._ | |
import net.liftweb.http.S | |
import net.liftweb.record._ | |
import net.liftweb.record.field._ | |
import S._ |