Skip to content

Instantly share code, notes, and snippets.

View scottboms's full-sized avatar

Scott Boms scottboms

View GitHub Profile
@simoncozens
simoncozens / sparsify.py
Last active April 26, 2024 17:48
sparsify.py - turn masters into sparse masters
import uuid
from glyphsLib import load, GSPath, GSNode, GSLayer
from fontTools.varLib.models import VariationModel, normalizeValue
import numpy as np
from tqdm import tqdm
import argparse
def interpolate_paths_without(glyph, intermediate_layer, intermediate_location):
tags = [axis.axisTag for axis in glyph.parent.axes]
@volfegan
volfegan / Image_to_ASCII_flow.pde
Last active January 27, 2024 13:57
Maps an image into different ASCII characters gradients that sometimes form a flow
//References
//Font: http://laemeur.sdf.org/fonts/
//http://paulbourke.net/dataformats/asciiart/
//https://youtu.be/AGR3sfOq2qc?t=5911
//Related
//https://github.com/odditica/ProcessingStuff/blob/master/ItsTerminal/ItsTerminal.pde
//https://github.com/JaceyPenny/ASCIIToImage/blob/master/Main.java
//ASCII gradient references
//"@MBHENR#KWXDFPQASUZbdehx*8Gm&04LOVYkpq5Tagns69owz$CIu23Jcfry%1v7l+it[] {}?j|()=~!-/<>\\\"^_';,:`. "
@una
una / style.css
Last active September 22, 2023 18:11
min() max() clamp()
.sidebar {
/* Select smaller of the 2 calculated values
Narrower screens: 20vw, Wider screens: 300px */
width: min(20vw, 300px);
}
.make-the-logo-bigger {
/* Select larger of the 2 calculated values
Basically clamps the font size to 60px or larger (10vw) */
font-size: max(60px, 10vw);
@marcedwards
marcedwards / twister.pde
Last active April 16, 2021 12:43
A twisty 3D effect using a 2D image, created with Processing
// A sin-y, wobbly, twisty, 3D-looking thing that slices up an image to create its effect.
// For more information and to download the image required, visit:
// https://dribbble.com/shots/5843126-Twisty-3D-effect-using-a-2D-image
//
// Place the image inside a folder called “data” alongside the Processing sketch for it to work.
// Created using Processing 3.4.
//
// Code by @marcedwards from @bjango.
PImage twist;
@justvanrossum
justvanrossum / SquareVsLozenge.py
Created May 3, 2016 19:07
DrawBot: Create a simple animation with a grid of rotating squares.
# http://dailydrawbot.tumblr.com/post/143801148619/square-vs-lozenge
def rotatedSquare(x, y, squareSize, angle):
offsetSin = squareSize * sin(radians(angle))
save()
translate(x + offsetSin, 0)
rotate(angle)
rect(0, 0, squareSize, squareSize)
restore()
@oznu
oznu / README.md
Last active October 28, 2024 23:20
How to Bootcamp / Dual Boot Windows 10 on a mid-2011 iMac using USB

How to Install / Bootcamp Windows 10 on a mid-2011 iMac using USB

Apple has released support for bootcamping Windows 10, but only on 2012 Macs and later. Despite not being supported. it is possible to install Windows 10 on earlier iMacs and it seems to run quite well.

IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.

RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.

Requirements

@croxton
croxton / stash_conditionals.md
Last active April 8, 2018 02:24
Stash and conditionals in EE 2.9

With Stash you have always been able to create global variables and evaluate them in the same template using if/else conditionals:

{exp:stash:set_value name="var" value="cheese" type="snippet"}

{if var == "cheese"}
  	We have cheese!
{if:else}
  	Where's the cheese, gromit? 
{/if}
@koenbok
koenbok / qc-framer.js
Created May 14, 2014 15:04
QC Spring Value Converter
var QcValueConverter = {
tensionFromQcValue: function(qcValue) {
return (qcValue - 30.0) * 3.62 + 194.0;
},
qcValueFromTension: function(tension) {
return (tension - 194.0) / 3.62 + 30.0;
},
frictionFromQcValue: function(qcValue) {
@subtleGradient
subtleGradient / Behavior.framer.js
Last active July 28, 2017 17:27
Simple Behavior sheet system for FramerJS. Allows you to apply pre-defined behaviors to your layers by changing the layer name. by Thomas Aylott (http://subtlegradient.com) Copyright 2013 Facebook. All rights reserved. MIT License.
function Behavior(PSD){
var _BehaviorNames = Object.keys(Behavior.behaviors)
.filter(function(BehaviorName){ return !!Behavior.behaviors[BehaviorName].namingPattern });
Object.keys(PSD).forEach(function(layerName){
var layer = PSD[layerName];
_BehaviorNames.forEach(function(BehaviorName){
var match = layerName.match(Behavior.behaviors[BehaviorName].namingPattern);
try {
@croxton
croxton / entries_archive.md
Last active April 8, 2018 01:30
Sort a list of entries by year and then by month
	{exp:stash:set_list name="entries" parse_tags="yes"}
		{exp:channel:entries channel="my_channel" orderby="date" sort="desc" dynamic="no" limit="999"}
		    {stash:title}{title}{/stash:title}
		    {stash:date_day}{entry_date format="%d"}{/stash:date_day}
		    {stash:date_month}{entry_date format="%m"}{/stash:date_month}
		    {stash:date_year}{entry_date format="%Y"}{/stash:date_year}
		    {stash:date_sort}{entry_date format="%Y-%F"}{/stash:date_sort}
		    {stash:date_machine}{entry_date}{/stash:date_machine}
		{/exp:channel:entries}

{/exp:stash:set_list}