Skip to content

Instantly share code, notes, and snippets.

Avatar

Oleh Krehel abo-abo

View GitHub Profile
@abo-abo
abo-abo / hyper.org
Created Jul 19, 2013
elisp/clojure/python basic operations comparison.
View hyper.org

hyperpolyglot

elispclojurepython
generationnumber-sequencerangerange
vectorvector⁅⁆
make-vector make-list make-string
length[[id:ced27672-063f-4205-8add
@abo-abo
abo-abo / org-agenda-quick-jump
Created Jul 20, 2013
org-mode agenda quick month/year selection with hjkl and 0-9.
View org-agenda-quick-jump
(defvar lawlist-month)
(defvar lawlist-year nil)
(defun lawlist-org-agenda-view-mode-dispatch ()
"Select the month in agenda view."
(interactive)
(message "View: [1-9] [o]CT [n]OV [d]EC, j(next), k(prev).")
(let* ((a (read-char-exclusive))
(year (or lawlist-year
(setq lawlist-year
@abo-abo
abo-abo / calign.el
Created Nov 7, 2013
A small arguments alignment hack for C/C++-like languages.
View calign.el
(defun extract-argument-positions (str)
"Given a single line C/C++ string, return list of arguments in form:
\(start-position end-position string\) for each argument"
(let ((args (list))
(pos 0))
(while (string-match "\\(?: [^ (\n]+\\)\\(?:,[\n ]\\|)\\|,$\\|;$\\|[ ]+=[ ]+\\)" str pos)
(push (list (match-beginning 0)
(match-end 0)
(substring (match-string-no-properties 0 str) 0 -1))
args)
@abo-abo
abo-abo / ido-helm.el
Created Feb 11, 2014
Emacs call helm from ido
View ido-helm.el
(require 'helm-buffers)
(require 'delsel)
(add-hook
'ido-setup-hook
(lambda()
(define-key ido-buffer-completion-map "\C-i" 'ido-buffer-helm)))
(defun ido-buffer-helm ()
(interactive)
@abo-abo
abo-abo / query.sql
Last active Sep 8, 2020
Use https://developers.google.com/bigquery/ to select top 100 repos by number of commits
View query.sql
select repository_name, count(repository_name) as pushes, repository_description, repository_url
from [githubarchive:github.timeline]
where type="PushEvent"
and repository_language="Emacs Lisp"
and parse_utc_usec(created_at) >= parse_utc_usec('2014-01-01 00:00:00')
group by repository_name, repository_description, repository_url
order by pushes desc
limit 100
@abo-abo
abo-abo / word-toggle.el
Created Dec 23, 2014
Emacs word toggles
View word-toggle.el
;;;###autoload
(defun capitalize-word-toggle ()
(interactive)
(let ((start (car
(save-excursion
(backward-word)
(bounds-of-thing-at-point 'symbol)))))
(if start
(save-excursion
(goto-char start)
@abo-abo
abo-abo / default.py
Created Dec 29, 2014
my custom Pygments style: ./pygments-main/pygments/styles/default.py
View default.py
# -*- coding: utf-8 -*-
"""
pygments.styles.default
~~~~~~~~~~~~~~~~~~~~~~~
The default highlighting style.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@abo-abo
abo-abo / idmb.org
Created Jan 3, 2015
IMDB top 250 in org-mode
View idmb.org

IMDB Top 250 [128/250]

[X] The Shawshank Redemption

[X] The Godfather

[X] The Godfather: Part II

[X] Pulp Fiction

[X] The Good, the Bad and the Ugly

[X] 12 Angry Men

[X] Schindler’s List

[X] The Dark Knight

[X] The Lord of the Rings: The Return of the King

@abo-abo
abo-abo / eclipse-theme.el
Created Jan 20, 2015
Emacs eclipse-theme
View eclipse-theme.el
(deftheme eclipse
"Color theme from Eclipse.")
(let ((class '((class color) (min-colors 89)))
(eclipse-bg "#ffffff")
(eclipse-fg "#000000")
(eclipse-const "#110099")
(eclipse-comment "#3F7F5F")
(eclipse-error "#FF0000")
(eclipse-builtin "#7F0055")
View qwerty.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.