Skip to content

Instantly share code, notes, and snippets.

View thundernixon's full-sized avatar

Stephen Nixon thundernixon

View GitHub Profile
@gferreira
gferreira / bulk-list.py
Last active August 6, 2019 15:51 — forked from okay-type/bulk-list.py
dropfile-ui
# jackson # ok@yty.pe
import os
from AppKit import NSFilenamesPboardType, NSDragOperationCopy
from vanilla import Window, List, Button
class doThing():
def __init__(self, path):
#!/bin/bash -e
pushd "$(dirname "$0")" >/dev/null
chardiffdir=$PWD
pushd "../.." >/dev/null
srcdir=$PWD
fontsample=$srcdir/misc/tools/fontsample/fontsample
popd >/dev/null
popd >/dev/null
outfile=$1
# menuTitle : myCloud Export/Import
# shortCut : command+control+e
"""
code took from LettError known as Erik van Blokland (or Erik van Blokland known as LettError)
This is window that wraps the functionality explained here:
https://forum.robofont.com/topic/646/export-glyph-image-edit-on-ipad-reimport-as-background-image
https://gist.github.com/LettError/d0d2688abe959595a88b3fdb85c18db3
"""
from vanilla import FloatingWindow, SquareButton, TextBox
@fabiomaggio
fabiomaggio / git-filter-branch-move-files.md
Last active October 20, 2022 08:48
Use git filter-branch to move all projects files to a subdir and rewrite all commits
  1. Clone project

  2. Checkout all branches that contain the files that should be moved

  3. Delete the remote

  4. Run the filter-branch command:

    git filter-branch --tree-filter 'mkdir -p /path/to/tmp; mv * /path/to/tmp; mkdir subdir; mv /path/to/tmp/* subdir/' --tag-name-filter cat --prune-empty -- --all
    • All files are first copied to a temporary dir and move from there to the new destination
  • Existing tags are updated
@kerryhatcher
kerryhatcher / gulpfile.js
Last active June 1, 2020 17:53
Gulp Markdown Nunjucks
'use strict';
// =======================================================================
// Gulp Plugins
// =======================================================================
var gulp = require('gulp'),
nunjucks = require('nunjucks'),
markdown = require('nunjucks-markdown'),
marked = require('marked'),
rename = require('gulp-rename'),
gulpnunjucks = require('gulp-nunjucks');
@jaredhowland
jaredhowland / clear-font-cache.md
Last active February 14, 2024 09:57
Clear Mac OS X Font Caches
@LettError
LettError / copyCurrentGitVersionToPrevLayer.py
Last active July 4, 2019 08:25
RoboFont: copy glif from git repo to layer in current glyph.
"""
Assuming you have
a UFO open in RoboFont
a current glyph selected
and furthermore that
this glyph is part of a git repository
and that you have done some work on it
and would like to compare the current state in robofont
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>