Skip to content

Instantly share code, notes, and snippets.

# design settings
gutter = 60
radius = 6
pageW = 1600
# draw filled outline or contours
contour = False
# draw nodes and bluezones and vertical metrics?
@chrissimpkins
chrissimpkins / FontPreview.swift
Created December 24, 2015 13:47 — forked from leonbreedt/FontPreview.swift
Render font from command line on OS X without requiring font to be installed.
//
// FontPreview
// Copyright © 2015 Leon Breedt
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@chrissimpkins
chrissimpkins / cythonrun.py
Created January 11, 2016 19:32 — forked from brentp/cythonrun.py
run a cython .pyx file
#!/usr/local/bin/python
"""
build and run a .pyx file with dependencies.
runs a main() function if it exists.
automatically detects 'cimport numpy'
and includes headers. other includes/libs specificed by command-line args.
%prog [options] source.pyx dep1.c dep2.c
@chrissimpkins
chrissimpkins / fontsmoothie.js
Created January 26, 2016 01:50 — forked from letorbi/fontsmoothie.js
This code enforces font-smothing for web fonts even if it's not enabled in the system settings. More info: http://pixelsvsbytes.com/blog/2013/02/nice-web-fonts-for-every-browser
// Font Smoothie copyright 2013,14,15 Torben Haase <http://pixelsvsbytes.com>
// Source-URL <https://gist.github.com/letorbi/5177771>
//
// Font Smoothie is free software: you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version.
//
// Font Smoothie is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@chrissimpkins
chrissimpkins / hack4tex
Last active October 14, 2021 14:31 — forked from gramian/hack4tex
A small script to use the hack truetype font in pdflatex
#!/bin/sh
# hack4tex 0.1
# Copyright (c) 2016 Christian Himpe
# released under BSD 2-Clause License ( opensource.org/licenses/BSD-2-Clause )
# based on Stephan Lehmke's answer to "How do I use TrueType Fonts with PDFTeX
# using otftotfm?" on tex.stackexchange.com/a/52902
#
# requires otftotfm which is part of lcdf-typetools
#
@chrissimpkins
chrissimpkins / README-Template.md
Created October 6, 2017 19:58 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@chrissimpkins
chrissimpkins / gist:36462b1e3c5d0f0f4cd256cd2275d22c
Created October 6, 2017 20:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@chrissimpkins
chrissimpkins / font_cldr_locales.py
Created January 12, 2020 16:13 — forked from moyogo/font_cldr_locales.py
Check language CLDR locales supported by a font
'''
Requires pyicu, fontTools
Authors:
Denis Moyogo Jacquerye [https://github.com/moyogo]
MIT License [https://opensource.org/licenses/MIT]
'''
import sys
import icu
@chrissimpkins
chrissimpkins / ast2text.py
Created January 14, 2020 21:44 — forked from kylehowells/ast2text.py
Extract the plain text from markdown, for plain text search.
import commonmark
with open('test.md', 'r') as myfile:
text = myfile.read()
parser = commonmark.Parser()
ast = parser.parse(text)
# Returns the text from markdown, stripped of the markdown syntax itself
def ast2text(astNode):
@chrissimpkins
chrissimpkins / TrueColour.md
Created January 16, 2020 05:24 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)