Skip to content

Instantly share code, notes, and snippets.

@nonducor
nonducor / clocktable-by-tag.el
Last active December 18, 2023 20:59 — forked from ironchicken/clocktable-by-tag.el
Emacs org-mode dynamic block similar to clocktable, but grouped by tag. See: https://stackoverflow.com/questions/70568361/org-mode-review-clocked-time-by-multiple-tags
(require 'org-clock)
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
str))
(defun clocktable-by-tag/insert-tag (files params)
(let ((tag (plist-get params :tags))
(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
@brenopacheco
brenopacheco / howto.md
Last active September 8, 2023 02:11
storing git credentials with gpg and .netrc

storing git credentials with gpg and .netrc

  1. set up git credential helper in .gitconfig
    [credential]
        helper = /usr/share/git/credential/netrc/git-credential-netrc.perl
  1. add login configuration to .netrc
@exdeniz
exdeniz / migrate_from_exist_hitory.sh
Created June 6, 2020 21:17
Remove Duplicate zsh History
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory
@MatthewZMD
MatthewZMD / .mbsyncrc
Last active March 27, 2024 00:46
Gmail .mbsyncrc Sample
# mbsyncrc based on
# http://www.ict4g.net/adolfo/notes/2014/12/27/EmacsIMAP.html
# ACCOUNT INFORMATION
IMAPAccount gmail
# Address to connect to
Host imap.gmail.com
User <EMAIL_HERE>
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.emacs.d/mu4e/.mbsyncpass-<EMAIL_HERE>.gpg"
AuthMechs LOGIN
SSLType IMAPS
@haikebang
haikebang / hacker-howto.md
Created September 6, 2018 07:29 — forked from zer4tul/hacker-howto.md
Simplified Chinese edition of ESR's How To Become A Hacker

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@cbilson
cbilson / ob-powershell.el
Created February 6, 2018 03:27
Rough draft: execute poweshell from emacs src blocks
;;; ob-powershell.el --- org-babel functions for powershell evaluation
;; Authors: Chris Bilson
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
;;; Commentary:
;; Org-Babel support for evaluating powershell source code.
@chandraratnam
chandraratnam / mutt_mbsync_multipleaccounts.md
Last active March 27, 2024 00:46
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]

@lixingcong
lixingcong / Amplify.txt
Last active November 22, 2019 00:27
Amplify block list for my phone
微信
版本 6.7 GooglePlay版
唤醒锁
正则表达式 WakerLock:+[0-9]{0,26} 间隔999999
SyncService
StnCallBack
定时器
# 正则表达式设置Amplify链接 https://forum.xda-developers.com/showpost.php?p=64411243&postcount=6237
正则表达式 ALARM_ACTION+[(0-9)]{0,26} 间隔999999
com.tencent.mm/.booter/MMReceivers$AlarmReceiver 间隔60