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
;;; See: https://www.reddit.com/r/emacs/comments/3icpo7/take_a_break_every_3_hours/ | |
(defvar breaktime-timer nil | |
"Holds the running break timer (if any).") | |
(defvar breaktime-interval (* 3 60 60) | |
"How often to take a break, in seconds.") | |
(defun breaktime--take-a-break () | |
(interactive) | |
(switch-to-buffer (get-buffer-create "*breaktime*")) | |
(let ((inhibit-read-only t)) |
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
(use '(incanter core processing)) | |
;; simple interactive Processing example taken from processingjs.org website: | |
;; http://processingjs.org/source/basic-example/processingjs_basic-example.html | |
;; set up variable references to use in the sketch object | |
(let [radius (ref 50.0) | |
X (ref nil) | |
Y (ref nil) |
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
# Set git tab completion and PS1 integration | |
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
. /usr/local/git/contrib/completion/git-completion.bash | |
fi | |
GIT_PS1_SHOWDIRTYSTATE=true | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion | |
fi |
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 bash | |
# place this in your path somewhere | |
# usage xcodeversionr.sh 1.0.1 MyProject-Info.plist | |
echo "Version: $1" | |
echo "File: $2" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $1 (build `git rev-parse --short HEAD`)" $2 |
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
#!/bin/bash | |
# Handles proper use of Meld from Git. | |
# | |
# Instead of launching meld with $MERGED as the base revision, this | |
# script makes a copy of $BASE and handles copying the result back | |
# to $MERGED if the result was saved. | |
# As an extra tweak, it also presents branch names (if known) as | |
# the file name prefix, instead of just "LOCAL" and "REMOTE". |
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
worldclock() { | |
ADDIS_ABABA=`TZ=Africa/Addis_Ababa date +"%c (%z %Z)"` | |
BERLIN=`TZ=Europe/Berlin date +"%c (%z %Z)"` | |
CHICAGO=`TZ=America/Chicago date +"%c (%z %Z)"` | |
HONK_KONG=`TZ=Asia/Hong_Kong date +"%c (%z %Z)"` | |
LONDON=`TZ=Europe/London date +"%c (%z %Z)"` | |
LOS_ANGELES=`TZ=America/Los_Angeles date +"%c (%z %Z)"` | |
MOSCOW=`TZ=Europe/Moscow date +"%c (%z %Z)"` | |
NEW_YORK=`TZ=America/New_York date +"%c (%z %Z)"` | |
SOFIA=`TZ=Europe/Sofia date +"%c (%z %Z)"` |
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
(require 'flymake) | |
(defvar go-compiler "8g") | |
(defun flymake-go-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) |
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
;; The 10 Scala one-liners tranlated to Clojure. | |
;; http://mkaz.com/solog/scala/10-scala-one-liners-to-impress-your-friends.html | |
;; Oh, there are more of them: | |
;; Python: http://codeblog.dhananjaynene.com/2011/06/10-python-one-liners-to-impress-your-friends/ | |
;; Ruby: http://programmingzen.com/2011/06/02/10-ruby-one-liners-to-impress-your-friends/ | |
;; CoffeeScript: http://ricardo.cc/2011/06/02/10-CoffeeScript-One-Liners-to-Impress-Your-Friends.html | |
;; Another Clojure version: http://freegeek.in/blog/2011/06/10-clojure-one-liners/ | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Monokai</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
<?xml version="1.0"?> | |
<!DOCTYPE COMMANDO SYSTEM "commando.dtd"><!-- processing commando --> | |
<!-- Monkstone, 2012-Nov-2 --> | |
<COMMANDO> | |
<UI> | |
<CAPTION LABEL="Run Processing"> | |
<FILE_ENTRY LABEL="pde file" VARNAME="pde" EVAL="MiscUtilities.getParentOfPath(buffer.getPath())"/> | |
</CAPTION> | |
<CAPTION LABEL="Path to processing-java"> |
OlderNewer