Skip to content

Instantly share code, notes, and snippets.

@lateau
lateau / .ctags
Created May 1, 2011 15:43
exburant ctags options for parrot: place at your $HOME
-f tags
-R
--totals
--exclude=.git
--exclude=.gitignore
--exclude=*~
--exclude=*.swp
--langdef=Parrot
--langmap=Parrot:+.pir.pg.pasm.pm
--sort=yes
@lateau
lateau / late-night-theme.el
Last active August 11, 2020 05:35
Late Night Theme for Emacs24: Color theme by Alex Schroeder, created 2003-08-07. This theme is for use late at night, with only little light in the room. The goal was to make something as dark and subtle as the text console in its default 80x25 state -- dark grey on black.
;;; late-night-theme.el --- Late Night theme for Emacs 24
;; Author: Alex Schroeder
;; Maintainer: Daehyub Kim <lateau at gmail.com>
;; URL: https://gist.github.com/4420862
;; Version: 0.0
;; Keywords: theme, color
;;; Commentary:
@lateau
lateau / delete-forward-all.el
Last active December 10, 2015 11:29
delete all characters from current cursor position to beginning-of-line like vim's "C-u"
(defun delete-forward-all ()
(interactive)
(let ((beg (point))) (move-beginning-of-line 1) (delete-region beg (point))))
(global-set-key (kbd "C-u") 'delete-forward-all)
;;; simple-mode-line.el --- Simplified Mode Line for Emacs 24
;; Author: Daehyub Kim <lateau at gmail.com>
;; URL: https://gist.github.com/4511988
;; Version: 0.3
;; Keywords: mode-line, color
;;; Commentary:
;; This simplified mode line is adjusted to *white* themes.
@lateau
lateau / copy-forward-all.el
Created March 28, 2013 04:23
Copy characters from current point to end of line.
(defun copy-forward-all()
(interactive)
(kill-ring-save (point) (line-end-position))
(message "Yanked!"))
;; (global-set-key (kbd "M-k") 'copy-forward-all)
@lateau
lateau / dont-kill-emacs.el
Created March 28, 2013 04:27
Disable C-x C-c binding execute kill-emacs.
(defun dont-kill-emacs()
"Disable C-x C-c binding execute kill-emacs."
(interactive)
(error (substitute-command-keys "To exit emacs: \\[kill-emacs]")))
(global-set-key (kbd "C-x C-c") 'dont-kill-emacs)
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget -c https://gist.github.com/lateau/6238598/raw/7f7fa79be5104a7fa6a54a62e1ce6348313bc9a9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
declare -r install_redis_redis_version="2.6.14"
@lateau
lateau / gwan.el
Last active August 29, 2015 13:57
;;; gwan.el --- A G-WAN helper for Emacs 24
;; Author: Daehyub Kim <lateau at gmail.com>
;; Version: 0.0
;; Keywords: server, web, tool
;;; Commentary:
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
@lateau
lateau / create-scratch-buffer.el
Last active August 29, 2015 14:20
create-scratch-buffer.el
(defmacro create-scratch-buffer (name &optional comment body)
"Create a new custom scratch buffer. The name should be a valid major mode name without -mode suffix.
The body should be lambda block or a symbol of function that be invoked after a scratch buffer created. nil is accepted to turn it off."
`(defun ,(intern (concat "scratch-" name))
()
(interactive)
(let ((bufname (concat "*scratch-" ,name "*")))
(if (buffer-live-p (get-buffer bufname))
(switch-to-buffer bufname)
(with-current-buffer (get-buffer-create bufname)
@lateau
lateau / c9cmd.txt
Last active February 15, 2016 09:58
cloud9 command list
// Get all commands
/*global services*/
const commands = services['commands'];
var keys = Object.keys(commands.commands); // ['passKeysToBrowser, cancelBrowserAction, ...]
// Complete list
// Some are not listed on their key bindings and API documentation.
addCursorAbove
addCursorAboveSkipCurrent
addCursorBelow