Skip to content

Instantly share code, notes, and snippets.

View frankrolf's full-sized avatar
😸
meow

Frank Grießhammer frankrolf

😸
meow
View GitHub Profile
@joubertnel
joubertnel / gist:870190
Last active July 8, 2023 12:52
HTML5 Canvas - Rendering of Text on high-DPI screens
<html>
<head>
<script src='http://code.jquery.com/jquery-1.5.1.min.js'></script>
</head>
<body>
<h2>Naive canvas</h2>
<canvas id="naive" width="400" height="50"></canvas>
<h2>High-def Canvas</h2>
@mnem
mnem / git_fetch_pull_all_subfolders.sh
Created December 6, 2011 14:35
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@asimihsan
asimihsan / !resuilts.md
Created February 28, 2014 17:29
HTML5 canvas drawing tabular data for massive (50k+) coloured, interactive, tables.

With click handlers

  • 5k rows takes <1s.330MB!
  • 10k rows takes <2s, 700MB!!
@theMikeD
theMikeD / Make Ready Folder.jsx
Created February 14, 2015 18:37
Photoshop script to create a folder if it doesn't already exist
#target photoshop
// Mini-Script to create a folder if it doesn't already exist.
// This one requires editing by the end user.
// (c) Mike Dickson www.photoshoptools.ca
// Licensed under the GPL
// You will need to edit this location for your own uses
var f = new Folder("~/Desktop/sRGB Blog Images");
if ( ! f.exists ) {
@brechtm
brechtm / diffpdf.sh
Last active May 17, 2024 15:56
Page-by-page PDF diff tool
#!/bin/bash
# usage: diffpdf.sh file_1.pdf file_2.pdf
# requirements:
# - ImageMagick
# - Poppler's pdftoppm and pdfinfo tools (works with 0.18.4 and 0.41.0,
# fails with 0.42.0)
# (could be replaced with Ghostscript if speed is
# not important - see commented commands below)
{
"cmd": ["robofont", "-p", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
}
@LettError
LettError / angleRatioTool.py
Created February 28, 2019 09:57
EditTool script for RoboFont 3. Show the ratio between the length of incoming and outgoing sections of bcps and tangents.
import AppKit
from mojo.events import installTool, EditingTool, BaseEventTool, setActiveEventTool
from mojo.drawingTools import *
from mojo.UI import UpdateCurrentGlyphView
from defconAppKit.windows.baseWindow import BaseWindowController
import math
#
#
# A visualisation for RoboFont
"""
Open a bunch of ufos, select a bunch of interestng glyphs in a font window and run this.
As a nice bonus, this is also a way to reduce the scope of the the next and previous glyph hotkeys.
"""
from mojo.UI import SmartSet, AllFontWindows
f = CurrentFont()
for w in AllFontWindows():
@jo-lang
jo-lang / timm_ulrichs_rotating_e.py
Created November 19, 2020 12:46
Interpretation of a work by Timm Ulrichs to be run in drawbot app
'''
An interpretation of a work by Timm Ulrichs
see this blog post: https://letterformarchive.org/news/shaped-text
See other solutions in this twitter-thread:
https://twitter.com/MauriceMeilleur/status/1329218247594561538
'''
# ---------------
# S E T T I N G S
@connordavenport
connordavenport / SyncMMWindows.py
Last active June 6, 2023 16:18
A small script to keep certain MM windows in sync
import metricsMachine
from mm4.mmScripting import MetricsMachineScriptingError
from vanilla import FloatingWindow, List, CheckBox, PopUpButton
from mojo.events import addObserver, removeObserver
from AppKit import *
from mojo.UI import Message
class SyncMM:
def __init__(self):