Skip to content

Instantly share code, notes, and snippets.

View iani's full-sized avatar
💭
sc-hacks, sonarts_compmus_2020, emacs-prelude-personal-arch, sc-hacks-redux, dlb

Iannis Zannos iani

💭
sc-hacks, sonarts_compmus_2020, emacs-prelude-personal-arch, sc-hacks-redux, dlb
View GitHub Profile
@iani
iani / emacs shell PATH
Created April 3, 2011 14:41
set the path environment variable for shell commands in emacs. (different than exec-path variable!)
;; add the paths for MacTex and and ocaml on MacOS standard installs
(setenv "PATH"
(concat
"/usr/texbin:"
"/usr/local/bin:"
(getenv "PATH")))
@iani
iani / Partial_Application
Created April 6, 2011 09:53
Partial Application and argument * and ... in SuperCollider
//:n Normal way to define a function
f = { | i | i.squared }
f ! 5
[ 0, 1, 4, 9, 16 ]
//:p Partial application
@iani
iani / org_tree_timeline
Created April 14, 2011 14:13
Create a timeline view for the current subtree of an org-mode file. Fastest way to have overview of any projects or sub-projects dates (see: orgmode.org)
;; Note: you need to create the ~/tmp directory in your home folder for this to work:
(defun org-agenda-make-timeline-for-tree ()
"make a timeline view in agenda for current tree"
(interactive)
(org-copy-subtree)
(find-file "~/tmp/agenda_tmp.org")
(beginning-of-buffer)
(let ((beg (point))) (end-of-buffer) (delete-region beg (point)))
(org-paste-subtree)
@iani
iani / dot_emacs
Created April 14, 2011 14:27
My .emacs file
;; This is the .emacs file that should reside in your home directory ~/ with the name .emacs:
;; ~/.emacs
;; load general configuration
(load-file "~/Dropbox/notes/config/startup.el")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FOLLOWING IS USER SPECIFIC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@iani
iani / my terminal prompt configuration
Created April 20, 2011 13:40
setting the prompt variable for bash terminal in MacOS X
# Custom prompt for shell:
PS1="\[\033[0;36m\][\$(date +%H%M)][\u:\W]$\[\033[0;32m\] "
@iani
iani / bufrd_TDuty_Demand_Phasor
Created April 20, 2011 17:47
Use of TDuty with BufRd and Phasor for micro-montage in SuperCollider
//:! boot+open scope
Server.default = Server.internal;
if (Server.default.serverRunning.not) {
Server.default.waitForBoot({
Server.default.scope;
});
};
//:a first load a bigger sample to play with:
@iani
iani / emacs_orgmode_capture
Created May 10, 2011 14:41
my latest capture setup for emacs orgmode
;; Settings from March 5 2011 onwards:
;; TODO states and keys:
(setq org-todo-keywords
'(
(sequence "TODO(t)" "|" "DONE(d)" "CANCELLED(c)")
;; (sequence "TODO(t)" "STARTED(s)" "WAITING(w)" "APPT(a)" "EVT(e)" "TRAVEL(v)" "CLASS(c)"
;; "|" "DONE(D)" "CANCELLED(C)" "DEFERRED(F)")
;; (sequence "DELEGATED(l)" "FOLLOWUP(p)")
@iani
iani / emacs_orgmode_capture
Created May 10, 2011 14:41
my latest capture setup for emacs orgmode
;; Settings from March 5 2011 onwards:
;; TODO states and keys:
(setq org-todo-keywords
'(
(sequence "TODO(t)" "|" "DONE(d)" "CANCELLED(c)")
;; (sequence "TODO(t)" "STARTED(s)" "WAITING(w)" "APPT(a)" "EVT(e)" "TRAVEL(v)" "CLASS(c)"
;; "|" "DONE(D)" "CANCELLED(C)" "DEFERRED(F)")
;; (sequence "DELEGATED(l)" "FOLLOWUP(p)")
@iani
iani / orgmode_html_project_preamble
Created May 19, 2011 10:45
Preamble example for HTML project export from orgmode
(require 'org-publish)
(setq org-publish-project-alist
'(
("org-files-publish-local"
:org-publish-use-timestamps-flag nil
:base-directory "/Users/iani/Dropbox/sites/orgFiles/"
:base-extension "org"
:publishing-directory "/Users/iani/Dropbox/sites/htmlFiles"
:section-numbers nil
:table-of-contents nil
@iani
iani / orgmode_publish_2011_06_09.el
Created June 8, 2011 19:05
ORGMODE_PUBLISH_PROJECT
;;======== Publish setup ==========
;; Shortcuts
;; 1) Open index.org file
(defun open-index-org ()
"Open index.org file for website rsync"
(interactive)
(find-file "~/Dropbox/sites/orgFiles/index.org"))
(global-set-key (kbd "C-x M-w") 'open-index-org)