Skip to content

Instantly share code, notes, and snippets.

View psql's full-sized avatar
🏝️
aloha

Professor P psql

🏝️
aloha
View GitHub Profile
--- General ---
Undo: cmd + Z
Redo: cmd + shift + Z
Redo: cmd + Y
Setup/Animate Mode: cmd + TAB
Zoom To Fit: cmd + shift + F
Zoom To 100%: cmd + F
Lock Zoom:
Fullscreen: cmd + shift + opt + F
Always On Top: cmd + shift + opt + T
/**
* The preload script needs to stay in regular ole JavaScript, because it is
* the point of entry for electron-compile.
*/
require('../stat-cache');
const { init } = require('electron-compile');
const { assignIn } = require('lodash');
const path = require('path');
From Adam Plouff on Twitter:
Maintain stroke width. Works for scale and infinite parenting. Apply to Stroke Width property:
value / length(toComp([0,0]), toComp([0.7071,0.7071])) || 0.001;
So useful!!!
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
float scale = 200.0;
@psql
psql / rangemap.glsl
Created June 20, 2018 21:47
range map.glsl
#ifdef GL_ES
precision mediump float;
#endif
#define PI 3.14159265359
float plot(vec2 st, float pct){
return smoothstep( pct-0.01, pct, st.y) -
smoothstep( pct, pct+1.0, st.x);
@psql
psql / app.ts
Created August 23, 2018 20:54
modal issue
import { Data, animate, Override, Animatable } from "framer";
import { button } from "./canvas";
const data = Data({
buttonOpacity: Animatable(0),
buttonScale: Animatable(0),
buttonOffset: Animatable(-20),
modalOpacity: Animatable(0),
modalVisibility: false
});
@psql
psql / gist:94481068cde4959dde660247e5b832c1
Created September 17, 2018 21:27
Open multiple copies of Maya
open -n /Applications/Autodesk/maya2008/Maya.app
{"v":"5.1.16","fr":60,"ip":0,"op":348,"w":200,"h":200,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.39],"y":[1]},"o":{"x":[0.61],"y":[0]},"n":["0p39_1_0p61_0"],"t":0,"s":[0],"e":[360]},{"t":111}],"ix":10},"p":{"a":0,"k":[101.757,101.081,0],"ix":2},"a":{"a":0,"k":[652.144,-55.005,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.39,0.39,0.39],"y":[1,1,1]},"o":{"x":[0.61,0.61,0.61],"y":[0,0,0]},"n":["0p39_1_0p61_0","0p39_1_0p61_0","0p39_1_0p61_0"],"t":0,"s":[207.107,207.107,100],"e":[270.107,270.107,100]},{"i":{"x":[0.39,0.39,0.39],"y":[1,1,1]},"o":{"x":[0.61,0.61,0.61],"y":[0,0,0]},"n":["0p39_1_0p61_0","0p39_1_0p61_0","0p39_1_0p61_0"],"t":54,"s":[270.107,270.107,100],"e":[207.107,207.107,100]},{"t":111}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.734,-1.487],[0,0],[0,0],[1.188,-1.158],[0,0],[0,0],[1.468,0.772],[0,0],[0,0],[-0.28,1.635],[0,0],[0,0],[-1.641,0.239],[
{"v":"5.1.16","fr":60,"ip":0,"op":721,"w":1000,"h":1000,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[572.527,672,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[50.539,50.539,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[35.109,0],[2.846,37.878],[-21.297,0],[0,-53.237]],"o":[[-33.38,0],[-3.531,-46.998],[21.297,0],[0,37.984]],"v":[[244.963,113.551],[190.942,48.227],[241.511,-20.55],[310,48.227]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[38.591,0],[-6.399,-85.165],[-60.488,0],[0,68.831]],"o":[[-38.591,0],[5.157,68.637],[63.62,0],[0,-96.47]],"v":[[234.342,-75],[142.706,49.629],[240.598,168.002],[358.449,49.629]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.262745098039,0.478431402468,1],"i
{"v":"5.3.4","fr":30,"ip":0,"op":186,"w":996,"h":600,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 29","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[646,380,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[238.5,23.763],[238.5,22.904]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.172549019608,0.709803921569,0.890196078431,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":7,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vec