Skip to content

Instantly share code, notes, and snippets.

@dannypage
dannypage / twitter_font_adblock.txt
Created August 24, 2021 21:44
How to block Twitter's terrible font
# Go to uBlock's options and paste in the following under the "My Filters" tab
https://abs.twimg.com/fonts/chirp-bold-web.woff
https://abs.twimg.com/fonts/chirp-heavy-web.woff
https://abs.twimg.com/fonts/chirp-regular-web.woff
https://abs.twimg.com/fonts/v2/chirp-bold-web.woff
https://abs.twimg.com/fonts/v2/chirp-heavy-web.woff
https://abs.twimg.com/fonts/v2/chirp-medium-web.woff
https://abs.twimg.com/fonts/v2/chirp-regular-web.woff
#!/bin/bash
# This script converts the Firefox .tar.bz2 into a Firefox AppImage
# NOTE: This is for demonstration only. For a real production AppImage, one would add
# * update information (for binary delta updates)
# * embedded digital signature (to validate authorship)
# * possibly additional dependencies (if needed)
# * additional metadata to help desktop integration
# Download and extract Firefox .tar.bz2
@willprice
willprice / jupyter-lab.service
Created February 20, 2018 17:47
Jupyter Lab SystemD user service file.
# file: ~/.config/systemd/user/jupyter-lab.service
# systemctl enable --user jupyter-lab
# systemctl start --user jupyter-lab
[Unit]
Description=Jupyter Lab Server
[Service]
ExecStart=/usr/bin/jupyter lab --no-browser --port=8889
WorkingDirectory=%h/jupyter
@cvcore
cvcore / org-fragment-auto-preview.el
Last active May 30, 2020 18:33
Automatic fragment toggling in org-mode
;;
;; 28.07.2017
;; Charles Wang
;;
;;;;;;; Tweaks for Org & org-latex ;;;;;;
(defvar cw/org-last-fragment nil
"Holds the type and position of last valid fragment we were on. Format: (FRAGMENT_TYPE FRAGMENT_POINT_BEGIN)"
)
@hadrianw
hadrianw / prace.c
Last active January 24, 2016 01:06
Process Race - wait for a child process to finish, kill the rest.
/*
Compile with:
$ gcc prace.c -o prace -std=c99 -pedantic -Wall -Wextra
Example usage in shell script:
$ ((sleep 4; echo foo)& (sleep 2; echo bar)& exec ./prace)
bar
$
*/
@eguneys
eguneys / turkish.el
Created October 2, 2014 09:54
Emacs Turkish Mode
(defvar turkish-el-version "$Id: turkish.el,v 2.7 2010/02/27 18:22:36 dyuret Exp $")
;;; Emacs Turkish Extension (c) Deniz Yuret, 2006, 2010
;;; This is for people trying to type Turkish documents on a U.S.
;;; keyboard. The latest version is available at:
;;; http://denizyuret.blogspot.com/2006/11/emacs-turkish-mode.html
;;; To activate the program first load this file into emacs:
;;; M-x load-file ENTER turkish.el ENTER