Skip to content

Instantly share code, notes, and snippets.

View 5hanth's full-sized avatar

Shanthakumar 5hanth

  • Software Consultant
  • Chennai
View GitHub Profile
@5hanth
5hanth / format_mails.el
Created February 22, 2016 18:04
Format mails for interleaved response in emacs
(defun sha/format-mail-header ()
(interactive)
(with-current-buffer (current-buffer)
(let ((beg (region-beginning))
(end (region-end))
(fill-column 60))
(goto-char beg)
(insert "Hi,\n\n")
(forward-line 0)
(insert "---")
@5hanth
5hanth / gifcast.el
Created February 22, 2016 17:59
Screencasting + Gif = Gifcasting :: using ffcast + ffmpeg in emacs
(defun sha/screencast (&optional output-file)
(let ((output-file
(or output-file
(concat "/tmp/"
(format "%S" (abs (random)))
".mp4"))))
(message "screen-cast started")
(start-process "screencasting"
(get-buffer-create "*screencast-buffer*")
"ffcast"
@5hanth
5hanth / strug-mod.zsh-theme
Created February 9, 2016 07:50
Simple prompt based on strug.zsh-theme
# Simple prompt based on strug.zsh-theme
PROMPT='
%~ %T
'
local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%} "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
@5hanth
5hanth / flames.clj
Last active October 30, 2015 06:29
FLAMES
(defn _do-flames [n fl]
(let [do-split (fn [n fl]
(let [[xs ys] (split-at n fl)]
(flatten
(conj (butlast xs)
ys))))
c (count fl)]
(cond (= c 1)
(first fl)
(<= n c)