Instantly share code, notes, and snippets.

View default-hiragana-mode.patch
From 31d9e4db4ba96e5c9e2c4922be22b7a07da19100 Mon Sep 17 00:00:00 2001
From: Ivan Kozik <ivan@ludios.org>
Date: Sat, 3 Mar 2018 11:30:13 +0000
Subject: [PATCH] Activate IME to use Hiragana input by default
---
src/unix/ibus/property_handler.cc | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/unix/ibus/property_handler.cc b/src/unix/ibus/property_handler.cc
View gist:daf56f2af26c7feddcdee239036453c9
Oct 25 21:24:00 hydra dhcpcd[118894]: eth0: carrier lost
Oct 25 21:24:00 hydra dhcpcd[118894]: eth0: deleting address fe80::215:5dff:febf:f00
Oct 25 21:24:00 hydra dhcpcd[118894]: eth0: deleting route to 172.23.118.48/28
Oct 25 21:24:00 hydra dhcpcd[118894]: eth0: deleting default route via 172.23.118.49
Oct 25 21:24:02 hydra dhcpcd[118894]: eth0: carrier acquired
Oct 25 21:24:02 hydra dhcpcd[118894]: eth0: IAID 5d:bf:0f:00
Oct 25 21:24:02 hydra dhcpcd[118894]: eth0: adding address fe80::215:5dff:febf:f00
Oct 25 21:24:03 hydra dhcpcd[118894]: eth0: soliciting an IPv6 router
Oct 25 21:24:03 hydra dhcpcd[118894]: eth0: rebinding lease of 172.23.118.51
Oct 25 21:24:03 hydra dhcpcd[118894]: eth0: probing address 172.23.118.51/28
View about:config prefs
# Disable about:config warning
general.warnOnAboutConfig -> false
# Start up with tabs from last session
browser.startup.page -> 3
# Use blank new tab page
browser.newtabpage.enabled -> false
# Denser UI
View grab-site 2.0 upgrade guide.md

grab-site 2.0 uses ludios/wpull for much faster HTML parsing using html5-parser and implements faster ignore-matching using the re2 module. These were the two major bottlenecks identified by pyflame and flamegraph.

Also, grab-site processes should now reconnect reliably to gs-server after gs-server goes down and reappears. Please let me know if this is not the case.

grab-site 2.0 upgrade guide

Follow the new install instructions, which now require installing libxml2/libxslt/re2 dependencies and Python 3.7.x.

If you have custom ignore patterns, replace {primary_netloc} with {any_start_netloc}.

View emacs-htmlize-exporter.el
(setq load-path (cons "~/opt/htmlize" load-path))
(require 'htmlize)
;;; fonts and colors - copy from your emacs configuration
; Needed for the org-headline-done below to work
(setq org-fontify-done-headline t)
(setq org-todo-keyword-faces
'(("CANCELED" :foreground "#686868" :weight bold)
View fractal.rs
// Based on the code in O'Reilly's Programming Rust, Chapter 2
extern crate num;
extern crate image;
extern crate crossbeam;
use std::str::FromStr;
use std::io::Write;
use std::fs::File;
use num::Complex;
View gist:176219a191fce5741755847dce9670cd
# cargo outdated
error: failed to parse manifest at `/tmp/cargo-outdated.81hypUXKZnNr/Cargo.toml`
Caused by:
editions are unstable
Caused by:
feature `edition` is required
consider adding `cargo-features = ["edition"]` to the manifest
View my_filters.txt
! Insecure - use https:// instead
http://www.inoreader.com
http://inoreader.com
! Ads and annoyances on criticker
criticker.com###i_bannerad
criticker.com##.i_bannerad
criticker.com###i_cookies
criticker.com###i_plead > div
View log.txt
<nullcone> there are four factors that determine if you should trust a person's advice
<nullcone> (1) what they know about your initial conditions (2) what they know about your boundary conditions (3) how cognitively capable they are (could depend on factors like fatigue), and how much you can trust their judgment (4) conflicts of interest/whether or not what they say is in your best interest
<SDr> nullcone, can you give a specific example for ways in which (1) might be important?
<nullcone> SDr: how smart you are, which profs you work with, you major, your personality
View google-chrome.sh
#!/bin/bash
set -eu -o pipefail
# We share a Chrome profile on multiple machines using a network filesystem,
# but we can't have more than one Chrome using it at the same time.
#
# Read SingletonLock to determine which machine Chrome is running on
# and Chrome's PID, then quit it on the remote machine if necessary.