Skip to content

Instantly share code, notes, and snippets.

;;; archive-7z.el --- Archive mode extensions for 7z
;; Author: Masahiro Hayashi <mhayashi1120@gmail.com>
;; Keywords:
;; Emacs: GNU Emacs
;; Package-Requires: ()
;;; Commentary:
;;
@lotem
lotem / luna_pinyin.custom.yaml
Created April 6, 2012 15:46
【朙月拼音】模糊音定製模板
# luna_pinyin.custom.yaml
#
# 【朙月拼音】模糊音定製模板
# 佛振配製 :-)
#
# 位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
#
@phette23
phette23 / update-repos.fish
Last active May 21, 2024 18:33
Shell script to run `git pull` inside all subdirectories which are git repositories. I keep a number of projects in a folder & this helps me avoid manually updating each.
#!/usr/bin/env fish
# similar script in Fish
# still under construction, need to quiet `git status` more effectively
function update -d 'Update git repo'
git stash --quiet
git pull
git stash apply --quiet
end
;; Simplified variant. Add only current perspective group.
(with-eval-after-load "ibuffer"
(require 'ibuf-ext)
(define-ibuffer-filter persp
"Toggle current view to buffers of current perspective."
(:description "persp-mode"
:reader (persp-prompt (safe-persp-name (get-frame-persp)) t))
@QiangF
QiangF / gist:5c7d1ec61b4d1cc52754
Last active August 29, 2015 14:27 — forked from hyone/gist:1323137
evil-text-object-defun
(require 'evil)
(setq evil-move-defun-alist
'((ruby-mode . (ruby-beginning-of-defun . ruby-end-of-defun))
(c-mode . (c-beginning-of-defun . c-end-of-defun))
(js2-mode . (js2-beginning-of-defun . js2-end-of-defun))))
(defun evil-move-defun (count &optional begin-defun end-defun)
"Move by defun"
(let ((count (or count 1))
#!/bin/sh
# Program to use the command install recursivly in a folder
magic_func() {
echo "entering ${1}"
echo "target $2"
for file in $1; do
if [ -f "$file" ]; then
@JPvRiel
JPvRiel / apt_pinning_priorities.md
Last active July 5, 2024 17:46
Apt package pinning and priorities
@zilti
zilti / sawinlist.el
Created October 24, 2016 15:22
Emacs script to interact with the Sawfish window manager. See http://sawfish.wikia.com/wiki/Sawinlist for more infos.
;;; sawinlist.el --- functions for listing and manipulating x-windows managed by sawfish
;; Copyright (C) 2011 , 2012 by the author: John Lumby johnlumby@hotmail.com
;; This file may be used in conjunction with GNU Emacs.
;; Both this file and GNU Emacs are free software; you may redistribute them and/or modify
;; them under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
@dhwajraj
dhwajraj / pdfmerger.py
Created January 14, 2017 13:55
pdf merging with filename as bookmarks.. got from github
#! /usr/bin/env python
# Original author Nicholas Kim, modified by Yan Pashkovsky
# New license - GPL v3
import sys
import time
from PyPDF2 import utils, PdfFileReader, PdfFileWriter
def get_cmdline_arguments():
"""Retrieve command line arguments."""
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active May 13, 2024 01:55
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.