Skip to content

Instantly share code, notes, and snippets.

for i in *.mp4;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
ffmpeg -i "$i" -c:v libx264 -s 1280x720 "${name}_compressed.mp4"
done
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
function draw() {
background(240);
push();
translate(0, height / 2);
let px, py, x, y;
function setup() {
createCanvas(400, 200);
background(220);
}
function draw() {
for(let i = 0; i < 100; i++){
let x = (frameCount+i/100) % width;
let y = height / 2 + sin(x)*(x*.01%1-.5) * 100;
point(x,y);
let t = 0;
let x, y, tx, ty, cx, cy;
function setup() {
createCanvas(400, 400);
x = random(width);
y = random(height);
tx = random(width);
ty = random(height);
}
let g1, g2;
function setup() {
createCanvas(400, 400);
g1 = createGraphics(width, height);
g2 = createGraphics(width, height);
g3 = createGraphics(width, height);
}
function draw() {
import bpy
import random
cells = random.randint(5,10)
size = 15
def map(sensor_val, in_from, in_to, out_from, out_to):
out_range = out_to - out_from
in_range = in_to - in_from
in_val = sensor_val - in_from
import bpy
import random
cells = 5
size = 10
def map(sensor_val, in_from, in_to, out_from, out_to):
out_range = out_to - out_from
in_range = in_to - in_from
in_val = sensor_val - in_from
val=(float(in_val)/in_range)*out_range
import bpy
import random
cells = 5
size = 10
def map(sensor_val, in_from, in_to, out_from, out_to):
out_range = out_to - out_from
in_range = in_to - in_from
in_val = sensor_val - in_from
val=(float(in_val)/in_range)*out_range
let blendmodeArr;
function setup() {
createCanvas(800, 800);
colorMode(HSB, 360, 100, 100, 100);
blendmodeArr = [BLEND, //ADD, DARKEST, LIGHTEST,
// DIFFERENCE,
EXCLUSION, MULTIPLY,
//SCREEN, REPLACE,
var targetObj = [];
var docObj = activeDocument;
for (var i = 0; i < docObj.pageItems.length; i++) {
typ = docObj.pageItems[i].typename;
if (typ != "TextFrame") continue;
targetObj.push(docObj.pageItems[i]);
}
for (var i = 0; i < targetObj.length; i++) {