Skip to content

Instantly share code, notes, and snippets.

View agenda.el
(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
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
brenopacheco /
Last active Mar 31, 2021
storing git credentials with gpg and .netrc

storing git credentials with gpg and .netrc

  1. set up git credential helper in .gitconfig
        helper = /usr/share/git/credential/netrc/git-credential-netrc.perl
  1. add login configuration to .netrc
haikebang /
Created Sep 6, 2018 — forked from zer4tul/
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:


  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
lixingcong / Amplify.txt
Last active Nov 22, 2019
Amplify block list for my phone
View Amplify.txt
版本 6.7 GooglePlay版
正则表达式 WakerLock:+[0-9]{0,26} 间隔999999
# 正则表达式设置Amplify链接
正则表达式 ALARM_ACTION+[(0-9)]{0,26} 间隔999999$AlarmReceiver 间隔60
evanwill /
Last active May 15, 2021
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

tony-jones / package.json
Last active May 8, 2021
jekyll site: asset building using npm run-scripts
View package.json
"name": "jekyll-starter-kit",
"version": "1.0.0",
"description": "jekyll, asset build using npm scripts",
"main": "src/scripts/main.js",
"scripts": {
"eslint:dist": "eslint src/scripts/*.js",
"eslint": "npm run eslint:dist",
"uglify:dist": "uglify -s src/scripts/*.js -o dist/scripts/main.min.js",
"uglify:_site": "uglify -s src/scripts/*.js -o _site/dist/scripts/main.min.js",
dannycastonguay /
Last active Jan 30, 2021
Installing Arch Linux on VirtualBox in Windows 10 for beginners

Installing Arch Linux on VirtualBox in Windows 10

I recently upgraded to a new system, and instead of running Arch Linux natively I've decided to run it inside VirtualBox on Windows 10. Below I note down the steps I took, which closely follow the excellent wiki pages of archlinux. But along the way, I also noted a few other steps steps I took to make this system very comfortable, which you'll have to figure out for yourself if you like them or not!

Setting up Windows 10 to be ready

There isn't much of preparation required, given that I started from scratch, but I did have to setup my windows environment a little bit.

  1. Install the windows package manager chocolatey
  2. Install qBittorrent (which will be used to download an iso copy of arch) by running the following command from the command line choco install qbittorrent (recommended to run the command line as an adm
r-brown / howto-install-jekyll_homebrew-rbenv.txt
Last active Oct 30, 2020
How to install Jekyll using Homebrew and rbenv
View howto-install-jekyll_homebrew-rbenv.txt
# install Homebrew
$ su ruby -e "$(curl -fsSL"
# show brew commands
$ brew help
# check current user
$ echo $(whoami)
# grant access to the folders
patik /
Last active Apr 23, 2021
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date: