This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /tmp | |
rm -rf z b | |
mkdir z z/a z/b | |
ln -s z/b | |
cd b | |
emacs -Q --batch --eval='(error (expand-file-name "../a"))' # /tmp/a | |
realpath "../a" # /tmp/z/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Macbook Air Mid-2012, Chromebook Pixel, and Lenovo X1 Carbon use the | |
tried-and-tested i5-3427U low-power dual-core Ivybridge. | |
Some notable exceptions: | |
- Macbook Air Mid-2013 jumped to a low-power Haswell i5-4250U. | |
Optionally, you can get it with i7-4650U. | |
- Some ultrabooks are experimenting with i7 dual-cores: notably, the | |
ASUS Zenbook Prime UX21A uses the 3517U Ivybridge. | |
- Some laptops like the Lenovo Y410p are running a quad-core i7 | |
Haswell. Unfortunately, this means that you can expect absolutely |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait FromStr2<T> { | |
fn from_str(&self) -> Option<T>; | |
} | |
impl<bool> FromStr2<bool> for ~str { | |
fn from_str(&self) -> Option<bool> { | |
match *self { | |
~"true" => Some(true), | |
~"false" => Some(false), | |
_ => None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
[ -n "$RBENV_DEBUG" ] && set -x | |
program="${0##*/}" | |
if [ "$program" = "ruby" ]; then | |
for arg; do | |
case "$arg" in | |
-e* | -- ) break ;; | |
*/* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2007 git Carlos Rica authored builtin/{tag.c, reset.c}; 26 total | |
2007 git Capitulino 11 trivial | |
2007 git Srijak zero contributions | |
2008 git Joshua Roys zero contributions | |
2008 git Sverre gitstats abandoned; 39 total (retained for a bit) | |
2008 git Lea Wiemann authored t9700-perl-git.sh; 19 total | |
2008 egit Marek Zawirski (?) | |
2008 git Miklos Vajna extensive work on git-merge; 171 total (retained) | |
2008 git Stephan Beyer sequencer abandoned; 53 total | |
2009 git Jeff Brantley zero contributions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro define-new-sh-style (indentation basic-offset match-path) | |
`(add-hook 'sh-mode-hook | |
(lambda () | |
(let ((filename (buffer-file-name))) | |
(when (and filename | |
(string-match (expand-file-name ,match-path) filename)) | |
(setq sh-indetnation ,indentation) | |
(setq sh-basic-offset ,basic-offset)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In essence, git commands are built to act on pure worktrees. It's | |
trivially Correct to pretend that an object store present in the | |
toplevel directory (as .git/) of the worktree doesn't exist, but it's | |
quite non-trivial to handle a .git directory anywhere else in the | |
worktree. Since we built git ground-up to act on a single | |
repository's worktree, embedding one repository inside another is a | |
hack: as a "workaround", we simply relocate the object store of the | |
submodule repository. Even then, working with one worktree embedded | |
inside another is something git never designed for: it explains why I | |
have to literally fight with git when using submodules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. git clone gh:artagnon/dotfiles, a repository with submodules. | |
2. git submodule update --init .elisp/auto-complete, a repository that | |
contains submodules. | |
3. .elisp/auto-complete/.gitmodules lists the submodules (lib/fuzzy, | |
lib/ert, and lib/popup). Let's try to initialize them from that | |
directory ... No! go back to toplevel. | |
4. Fine. Where are those submodules? git submodule status doesn't |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I use two rules for the git list. Note: don't use "from:me", because that matches email addresses with a "me" in them. | |
Match: (from:artagnon@gmail.com, to:git@vger.kernel.org OR cc:git@vger.kernel.org) | |
Do: Apply label "git" | |
Match: list:"<git.vger.kernel.org>" -{to:artagnon@gmail.com, cc:artagnon@gmail.com, from:artagnon@gmail.com} | |
Do: Skip Inbox, Apply label "git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kmacro-end-and-call-macro (arg &optional no-repeat) | |
"Call last keyboard macro, ending it first if currently being defined. | |
With numeric prefix ARG, repeat macro that many times. | |
Zero argument means repeat until there is an error. | |
To give a macro a permanent name, so you can call it | |
even after defining other macros, use \\[kmacro-name-last-macro]." | |
(interactive "P") | |
(if defining-kbd-macro | |
(kmacro-end-macro nil)) |