Skip to content

Instantly share code, notes, and snippets.

View anthrotype's full-sized avatar
🤔
debating umlauts

Cosimo Lupo anthrotype

🤔
debating umlauts
  • London
View GitHub Profile
@pradyunsg
pradyunsg / pip_upgrade_v2.rst
Last active June 26, 2016 04:16
Proposed change to pip for better upgrading behaviour

Abstract

@mauron85
mauron85 / suspend-modules
Last active October 13, 2024 16:26 — forked from anonymous/suspend-modules
Ubuntu 16.04 systemd unload modules on sleep
#!/bin/bash
# Put into /lib/systemd/system-sleep/suspend-modules
# chmod a+x /lib/systemd/system-sleep/suspend-modules
# Create /etc/suspend-modules.conf
# with one module per line
# credits to:
# https://bbs.archlinux.org/viewtopic.php?pid=1540125#p1540125
@diffficult
diffficult / chromeos-crosh-custom-setup.md
Last active October 4, 2024 08:41 — forked from bramford/chromeos-crosh-custom-setup.md
Customize your ChromeOS fonts - working April 2017

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active April 28, 2025 17:43
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@ebraminio
ebraminio / pangocairodrawtext.ipynb
Last active June 23, 2018 09:12
PangoCairo Draw Text
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Python3 port of http://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/UF.java.html
class DisjointSet:
"""
Execution: python disjoint_set.py < input.txt
Data files: http://algs4.cs.princeton.edu/15uf/tinyUF.txt
http://algs4.cs.princeton.edu/15uf/mediumUF.txt
http://algs4.cs.princeton.edu/15uf/largeUF.txt
Weighted quick-union by rank with path compression.
@adrientetar
adrientetar / ufoLib.md
Last active December 26, 2019 14:13
Technical note on the design of a new UFO library.

Thoughts on fontTools.ufoLib

w.r.t. my experience with defcon and ufoLib. Some of the functionality I discuss (notifications, etc.) definitely shouldn't go into fontTools however we ought to make fontTools.ufoLib "compatible" with these extra features. I'm sure we can do simple and versatile.

IMO fontTools.ufoLib should basically be written from scratch (with copy-pasting here and there) since ufoLib/defcon have significant bloat and apparently we want to use lxml.

General comments

Avoid the check-and-use pattern

import sys
sys.path.insert(0, '/Users/frederik/Downloads/fonttools-ufoLib/Lib')
import os
import shutil
import ufoLib
from fontTools.pens.basePen import NullPen
@typesupply
typesupply / speed.py
Last active June 14, 2018 17:30 — forked from typemytype/quick_ufoLibTest.py
Test for ufoLib validation and speed improvements.
"""
This compares the speed of experimental changes in ufoLib
with the experimental ufoLib in fontTools. This requires the
"Roboto-Regular.ufo" font to be located next to this script.
"""
import os
import shutil
import timeit
import cProfile
@typemytype
typemytype / pathOpsDrawBotTest.py
Last active August 20, 2018 08:31
visual tests for pathops
import pathops
from booleanOperations.booleanOperationManager import BooleanOperationManager
import time
import math
print("pathops version:", pathops.__version__)
f = CurrentFont()