Skip to content

Instantly share code, notes, and snippets.

@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

#!/usr/bin/env bash
# with_host.sh 54.90.136.89 foo.bar.com chromium-browser
# Runs a program with a one-off /etc/hosts via unshare(1)
# http://unix.stackexchange.com/a/242830
if [[ $1 == "--" ]]; then
mount $2 /etc/hosts --bind
USER=$3
PROGNAME=$4
shift 4
exec sudo -u $USER -- "$PROGNAME" "$@"
@borkdude
borkdude / selector-monitor.boot
Last active August 13, 2016 06:33
Monitor HTML page via CSS selector for change
#!/usr/bin/env boot
;; to run:
;; - install Boot (http://boot-clj.com/). Via brew: brew install boot-clj
;; - save this gist to a file
;; - chmod +x the file
;; - run the file
;; Settings. Change however you like.
(def url "http://www.nu.nl/")
@alandipert
alandipert / with_conditions.clj
Last active March 18, 2016 18:26
inline pre/post conditions macro
(defmacro with-conditions
[conditions & body]
{:pre [(map? conditions)]}
(if-not *assert*
`(do ~@body)
(let [ret (gensym "ret")]
`(do ~@(for [pre (:pre conditions)]
`(when-not ~pre
(throw (ex-info "Precondition failed" {:pre '~pre}))))
(let [~ret (do ~@body)]
@bishboria
bishboria / springer-free-maths-books.md
Last active May 10, 2025 04:28
Springer made a bunch of books available for free, these were the direct links

This document is my personal writeup of trying to make sense of all the clojure(script) tooling chain. It might contain errors and it actually contains a few questions

Tooling:

Nomenclature/Terminology

REPL: A prompt in its simples form.

  1. Waits for and Reads input,
@paulirish
paulirish / bling.js
Last active May 26, 2025 20:31
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@city41
city41 / gist:aab464ae6c112acecfe1
Last active January 19, 2021 12:51
ClojureScript secretary client side navigation without hashes

This is the example that comes with the reagent template converted to use HTML5 based history. This means there are no # in the urls.

I just got this working, so there might be better approaches

The changes are

  • use goog.history.Html5history instead of goog.History
  • listen to clicks on the page, extract the path from them, and push them onto the history
  • listen to history changes, and have secretary do its thing in response
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.