Skip to content

Instantly share code, notes, and snippets.

View ajchemist's full-sized avatar
🕶️

ajchemist

🕶️
  • Korean Peninsula
View GitHub Profile
@ajchemist
ajchemist / bc
Last active December 30, 2015 10:59
## Usage: C-x h M-| bc RET
## i(in) o(out)
# Decimal to Binary
obase=2
2
4
8
16
32
;;; Do not use this configuration. It's OBSOLETE!!!
;;; Try current ggtags.el.
;;; That can handles bunch of stuff wisely.
(defvar gtags-create-tags-mask
'("/usr/src/linux/")
"regexp list")
(add-hook 'c-mode-common-hook
#'(lambda ()
(make-pathname :name nil :type nil
:version nil
:defaults (translate-logical-pathname *load-pathname*))
(pathname (directory-namestring *load-pathname*))
(setq *invite-timer*
(run-with-timer 0 (* 60 10) ; see also `run-with-idle-timer'
#'(lambda ()
(with-current-buffer "#chan" ; see also `erc-with-buffer'
(erc-server-send "INVITE NICK #chan")))))
(cancel-timer *invite-timer*)
#+TITLE: Emacs.org
#+INCLUDE: emacs_journal.org :minlevel 1
# ---------------------------------------------------------------
#+TITLE: Emacs Journal.org
#+ARCHIVE: emacs.org::
# 이제 emacs_journal.org에서 org-archive를 실행하면, emacs.org_archive
;;;; erc4klisper.el starts here
;;; Usage:
;;; 1. append this code to ~/.emacs
;;; 2. locate this file to your custom `load-path',
;;; and adding to ~/.emacs
;;;
;;; (require 'erc4klisper)
;;;
;;; or
;;;
(let* ((config-dir user-emacs-directory)
(config-file (expand-file-name ".config" config-dir)))
(defmacro with-el-config (&rest body)
`(let* ((__parsed-data__ ',(cdr (with-temp-buffer
(insert-file-contents-literally config-file)
(search-forward "load-with-config" nil t)
(end-of-defun)
(preceding-sexp))))
(__load-file-name__ load-file-name)
(__id__ ',(intern (file-relative-name
(defun winnum-select (&optional num)
"Selects the nth window."
(interactive (list (let (_)
(while (or (not (characterp _))
(<= _ 48) ; 0 not included
(and (> _ 57) (< _ 97))
(> _ 122))
(setq _ (read-event
#("Switch to Winnum: " 0 18
(face minibuffer-prompt)))))
;;;; usage -*- lexical-binding: t; -*-
;;; download this gist file, `winnum.el' and place it on one of your `load-path'.
;;; now, M-x byte-compile-file winnum.el RET and then M-x load-library winnum RET.
;;; f8 or super-o keybinding do all the fun!
;;; winnum id is on a mode-line.
;;;
;;;
;;; -UUU:**-1-F1 *scratch* All (1,0) (Fundamental yas) ---------------
;;; ^
;;; +---this!