Skip to content

Instantly share code, notes, and snippets.

@Anks
Anks / setup-org.el
Created March 30, 2016 05:28
org-mode setup
;;; Directory / File setup
(setq org-directory "~/Dropbox/org")
(setq org-default-notes-file "~/Dropbox/org/notes.org")
(setq org-archive-location "~/Dropbox/org/.archive")
(setq org-agenda-files (list org-directory))
;;; Configure org-capture
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/Dropbox/org/notes.org" "Tasks")
"* TODO %?\n %i\n SCHEDULED %t")
@Anks
Anks / codeasdata.fs
Created November 7, 2016 04:34
Code As Data in F#
(* Type definitions *)
// A list of functions that take the current context (TDS return),
// and return true if the column is supposed to be visible right now
type IsColumnVisible = (TdsReturn -> bool) list
// List of functions that take a data row (generic type 'T)
// and return true if the current column is supposed to be editable
type IsColumnEditable<'T> = ('T -> bool) list
@Anks
Anks / insert-clipboard.applescript
Created November 9, 2017 07:38
Applescript to 'type' your clipboard into textfields (useful for websites where they block paste)
on run
tell application "System Events"
keystroke (the clipboard)
end tell
end run
@Anks
Anks / trac-post-commit-hook.py
Created July 7, 2009 08:24
Adding a command to create a new version to trac's svn post-commit hook
#!/usr/bin/env python
# trac-post-commit-hook
#
# This version trac-post-commit-hook has a few customizations.
#
# 1. fix/fixes/fixed commands set status to 'testing' instead of closed.
#
# 2. Added a new command to create new versions. Any commit message with
# a pattern 'tagging version VERSION_NUMBER' or 'tagged version
@Anks
Anks / delete-merged-branches.sh
Created June 22, 2022 04:41
Delete all merged branches from your local git repository
git branch --merged | grep -v master | grep -v main | xargs git branch -d
@Anks
Anks / package.json
Created August 20, 2012 08:32
Easy local development with a node.js proxy
{
"name": "your-app-name",
"version": "0.0.1",
"private": true,
"dependencies": {
"http-proxy": "0.8.x",
"connect": "2.3.x"
}
}