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
(defvar-keymap embark-org-column-map | |
:doc "Keymap for Embark org-column actions." | |
:parent embark-org-table-map | |
"M-r" #'my-cua-enable-and-replace-in-rectangle-embark) | |
(defun my-embark-org-column-at-point () | |
"Target the org-column at point." | |
(when-let ((org-column | |
(and (org-at-table-p) | |
(not (looking-at-p "|")) ; since then we don't know which column you mean |
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
SELECT DISTINCT ?item ?numberOfSpeakers ?speakersTime ?iso639_1 ?iso639_3 ?itemLabel ?itemLabel_en | |
WHERE { | |
?item wdt:P31 wd:Q1288568; # Any instance of a modern (current use) language | |
wdt:P220 ?iso639_3; # that has an ISO 639-3 code | |
# Require number of speakers, but as a statement so we can get the "timestamp" of the property: | |
?item p:P1098 ?numberOfSpeakersStatement . | |
?numberOfSpeakersStatement ps:P1098 ?numberOfSpeakers. | |
optional { | |
?numberOfSpeakersStatement pq:P585 ?speakersTime. |
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/bash | |
### Save as "/usr/local/bin/progress" and chmod +x, then: | |
# | |
# $ progress ~/huge-file.tar.bz2 | |
# $ progress -p $(pidof bzcat) | |
# $ progress # progress of all open files, shows e.g. how far mpd is through your song :P | |
# | |
# source: http://stackoverflow.com/a/238140/69663 |
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 | |
if test -f .merlin; then | |
echo ".merlin already exists, bailing out ..." >&2 | |
exit 1 | |
else | |
# You could add your default EXT's and such to this list: |
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/python3 | |
from html.parser import HTMLParser | |
from sys import stdin | |
def p(*value): | |
print(*value, end='') | |
class MyHTMLParser(HTMLParser): | |
def handle_startendtag(self, tag, attrs): |
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/bash | |
declare OUTFORMAT=plain | |
set -e -u | |
run () { | |
local text=false | |
local -i i=0 | |
local out |
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
IMAPAccount fastmail | |
Host imaps:mail.messagingengine.com | |
User me@fastmail.com | |
# you may have to tweak the awk here + filename to your netrc/authinfo: | |
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d $HOME/.netrc.gpg | awk '$2==\"mail.messagingengine.com\" && $4==\"me@fastmail.com\" {print $6;exit(0)}'" | |
Port 992 | |
# Port 992 has a "flat" hierarchy; use with | |
# mail_location = maildir:~/.Maildir/:LAYOUT=fs:INBOX=~/.Maildir/INBOX | |
# in dovecot (see also MaildirStore.Inbox below) |
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
sudo apt install binutils | |
cd ~/src/an_autotools_project | |
export CXXFLAGS='-fuse-ld=gold' | |
export CFLAGS='-fuse-ld=gold' | |
./configure | |
make -j4 # no longer wait for linking! =D | |
# gcc doesn't support -fuse-ld=lld http://gcc.gnu.org/ml/gcc-patches/2016-07/msg00145.html :( |
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/python2 | |
import gtk.gdk | |
w = gtk.gdk.window_foreign_new( gtk.gdk.get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0] ) | |
w.set_decorations( (w.get_decorations()+1)%2 ) # toggle between 0 and 1 | |
gtk.gdk.window_process_all_updates() | |
gtk.gdk.flush() | |
# now bind this to super-r or something |
NewerOlder