Skip to content

Instantly share code, notes, and snippets.

View wiedzmin's full-sized avatar

Alex Ermolov wiedzmin

View GitHub Profile
;;; all.el --- Edit all lines matching a given regexp.
;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
;; Copyright (C) 1994 Per Abrahamsen
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Version: $Id: all.el,v 5.2 1997/03/04 10:29:42 abraham Exp $
;; Keywords: matching
;; LCD Archive Entry:
@valpackett
valpackett / gist:666161
Created November 7, 2010 14:55
Coda-like swapping in Emacs
(defun coda-swap (expr)
(interactive "sExpr: ")
(query-replace-regexp
(replace-regexp-in-string "$[1-2]" "\\\\([0-9a-zA-Z]*\\\\)" expr)
(replace-regexp-in-string "$[1-2]" (lambda (m) (if (equal m "$1") "\\\\2" "\\\\1")) expr)))
;; Example:
; enter
; width="$1" height="$2"
; and it will replace
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
(defun ido-completing-read-multiple (prompt choices &optional predicate require-match initial-input hist def sentinel)
"Read multiple items with ido-completing-read. Reading stops
when the user enters SENTINEL. By default, SENTINEL is
\"*done*\". SENTINEL is disambiguated with clashing completions
by appending _ to SENTINEL until it becomes unique. So if there
are multiple values that look like SENTINEL, the one with the
most _ at the end is the actual sentinel value. See
documentation for `ido-completing-read' for details on the
other parameters."
(let
@maio
maio / gist:2862867
Created June 3, 2012 09:58
Smart semi-colon in Emacs (and Vim)
;; Port of Coderush's smart semi-colon feature to Emacs
;;
;; When I hit semi-colon anywhere, Emacs will move cursor to the end of current
;; line and insert semi-colon (if it's not already there).
;;
;; Idea from last @CoderetreatCZ - HK
(defun maio/electric-semicolon ()
(interactive)
(end-of-line)
@puffnfresh
puffnfresh / arityguard.js
Last active December 11, 2015 18:19
Wat? You need arity guard!
function arityGuard(f) {
function guarded() {
var length = f._length || f.length;
if(arguments.length != length) {
throw new TypeError(
(f._name || f.name || '<anonymous>') +
' called with ' +
arguments.length +
' argument(s), expected ' +
length
@rusllonrails
rusllonrails / gist:4942901
Created February 13, 2013 07:32
GIT useful commands
GIT guide
1.) gitconfig
cd
.gitconfig
nano .gitconfig
2.) внутрь .gitconfig
@rawsyntax
rawsyntax / ui.el
Last active May 14, 2017 16:18
reset ui and toggle eshell visor
;;default display position/size based on display resolution
;;warning: assumption that the 24/22 " displays are oriented
;; above the laptop's display
;; Haven't found a way to check multiple monitor
;; relative orientation via emacs yet...
;;
;; a frame is passed in when firing on after-make-frame-fuctions,
;; but not necessary when calling interactively
(defun reset-ui (&optional frame)
(if frame
@nicferrier
nicferrier / talk-emacs-conf.org
Last active December 15, 2015 14:59
Annotated version of my EmacsConf talk. http://emacsconf.org. We all had a good time. It was REALLY quite nerve racking talking to a bunch of Emacs hackers. Scary audience. Especially with "zombie" wiegley in the front row. <- in joke.

EmacsWiki

the “Emacs problem” a microcosmic example

let’s fix this

oh yeah! let’s! and it can have spaceships!

and lasers for eyes!

and bullet teeth!

and it should be written in org-mode!

Everything should be Emacs

yeah yeah. obvious.

org-mode

Вакансия удаленного Django-разработчика

Привет, меня зовут Максим и я СТО в компании DevHub. Мы ищем python разработчика, который присоединится к нашей команде для реализации больших и интересных проектов, построенных на Django.

Для тех кто не любит читать длинные тексты приведу сразу ключевые слова вакансии:

  • Python, Django
  • PostgreSQL
  • Удалённая работа, фултайм
  • До 100 000 рублей