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
ext.add("bookmark-with-org", | |
function (aEvent, aArg) { | |
var od = window.content.document; | |
window.loadURI('org-protocol://capture://n/'+encodeURIComponent(od.location.href)+'/'+encodeURIComponent(od.title)+'/'+encodeURIComponent(window.getSelection())); | |
}, M({en: "Save bookmark in Emacs org-mode using org-protocol"})); | |
key.setGlobalKey(['C-x', 'r', 'm'], function (aEvent) { | |
ext.exec("bookmark-with-org", aEvent); | |
}, 'Bookmark in Emacs org-mode', true); |
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
key.setGlobalKey([['C-M-b'], ['C-B']], function (ev) { | |
var win = Services.wm.getMostRecentWindow(null); | |
win.CustomizableUI.setToolbarVisibility('PersonalToolbar', document.getElementById('PersonalToolbar').getAttribute("collapsed") == "true"); | |
}, 'Toggle bookmarks bar', true); |
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
;; If the org property value of CODING is not nil, mark the (capture) buffer it and use recode-region to recode it to UTF-8. | |
(defun jmn/recode-buffer-from-cp1252-to-utf-8 () | |
"" | |
(message "recoding buffer!") | |
(interactive) | |
(mark-whole-buffer) | |
(recode-region (region-beginning) (region-end) 'cp1252 'utf-8) | |
) |
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
;; How to make org-mode org-insert-link (C-c C-l) automatically fill in the description from a webpage: | |
(defun jmn/url-get-title (url &optional descr) | |
"Takes a URL and returns the value of the <title> HTML tag, | |
Thanks to https://frozenlock.org/tag/url-retrieve/ for documenting url-retrieve" | |
(let ((buffer (url-retrieve-synchronously url)) | |
(title nil)) | |
(save-excursion | |
(set-buffer buffer) | |
(goto-char (point-min)) |
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
import XMonad | |
import XMonad.Config.Gnome | |
import XMonad.Layout.NoBorders (smartBorders) | |
import XMonad.Util.EZConfig (additionalKeys, removeKeysP) | |
import XMonad.Actions.NoBorders | |
import XMonad.Layout.Fullscreen | |
import XMonad.Layout.NoBorders | |
-- import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ManageHelpers |
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
;; Align messages in Emacs erc IRC-client by setting nick names | |
;; to use a fixed number of chars. | |
(defun jmn-erc-format-nick (&optional user channel-data) | |
"Like `erc-format-nick' but trim/pad nick to a fixed length. | |
- Based on xwl-erc-format-nick" | |
(let ((nick (erc-format-nick user channel-data))) | |
(when (> (length nick) 9) | |
(setq nick (concat (substring nick 0 6) | |
".." |
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 | |
# https://nghttp2.org/documentation/h2load-howto.html | |
sudo apt-get update | |
sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config \ | |
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \ | |
libc-ares-dev libjemalloc-dev cython python3-dev python-setuptools libjemalloc-dev \ | |
libspdylay-dev | |
git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2 | |
autoreconf -i && automake && autoconf |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp5xK+7H7BFptsZOgPabttZx/evAx2TWNZ7GZnO0DrfRxhE7iu3Wv9X+MggMbImbpUnwvlUU9/I+2rs7l+113q6mUTSYv5UdIuykVNUmbSWuT9pk9BQbFWuZq85J3ZoX9mGc0gzpSmlbgCa2NL6L9bWPNldeIRsKn4aXG9H8wdGnNvUGHBk+PRBr0YDoFLbthK4t/KNv6LLvt2Wc2V6zOr3F01hPKVECj3Tj+ughhUlQiKEVsBm3kIUdhjbPinebdXqMrhBt830frBEnS98CpknwU/C8PamMQN8h+QYgH7r+QxNfd/n/ftNfLb8YJay3tOZwVr8ZnoPz/+MBII7bAV jmn@wo |
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
# http://www.listenlive.eu/uk.html | |
# wget the playlist and copy the track adress. | |
alias m='mplayer' | |
alias bbc-world='m http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk' | |
alias p1='m http://http-live.sr.se/p1-aac-192' | |
alias npr='mplayer tk' |
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
{ | |
"workbench.colorTheme": "Minimal Colors", | |
"workbench.activityBar.visible": true, | |
"window.zoomLevel": 1, | |
"workbench.sideBar.location": "right", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 12, | |
"editor.fontFamily": "'Fira Code', 'SF Mono', Hasklig, Menlo, Monaco, 'Courier New', monospace", | |
"terminal.integrated.fontLigatures": true, | |
"editor.lineNumbers": "off", |
OlderNewer