Skip to content

Instantly share code, notes, and snippets.

View cmarangu's full-sized avatar
📚
studying

Chase Marangu cmarangu

📚
studying
View GitHub Profile
@LadyScream
LadyScream / inside.pde
Created September 29, 2018 04:00
I'm still learning Java and Processing so this is in no way the best way to achieve this, but this is the way I've done it!
float time = 0;
int frame = 1;
boolean record = false;
Cube cube;
void setup(){
size(600, 600, P3D);
cube = new Cube(new PVector(0,0,0), 150);
}
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
set theProcessName to "iOS Simulator"
set theWindowNumber to 1
tell application "System Events"
tell process theProcessName
activate
tell window theWindowNumber
set thePosition to position
set theSize to size
end tell
@gregzanch
gregzanch / convert-base.ts
Created November 12, 2019 06:38
Base Conversion
function base_10_to_base_n(v: number,b: number,r:number[]=[]): number[]{
if(b==0) return;
if (Math.floor(v) != v || Math.floor(b) != b) return;
const div = Math.floor(v / b);
const rem = v - div * b
r.push(rem);
return div == 0 ? r.reverse() : base_10_to_base_n(div, b, r);
}
function base_n_to_base_10(val: number[], base: number) {
if (base == 0) return;
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
@nixin72
nixin72 / against-online-proctoring.md
Last active June 15, 2021 06:14
Proctored exams will not be tolerated

Dear Concordia University,

I am writing to you on behalf of the Concordia student body regarding the final exams and the decision to use online proctoring. We are urging you to change your decision about having online proctored exams. For many, this is an appalling invasion of privacy, a security risk, a demand for students to trade their morals for a grade, and discrimination against the less fortunate among the student body. In addition, over 7000 thousand Concordia students are against online proctoring.

  1. An invasion of privacy Forcing cameras and microphones into the homes of students is a violation of everyone's online privacy. For some, this might not be a huge concern, but for many others it's spying on
@jarble
jarble / generic_example.frag
Last active January 11, 2023 21:41
Generic programming in GLSL (parametric polymorphism, template metaprogramming) https://www.reddit.com/r/glsl/comments/mmxves/generic_programming_parametric_polymorphism/
//I wish there were a better way to do this!
#define func(type,name,param1,param2,body) type name(type param1,type param2) {body}
#define generic(name,param1,param2,body) func(float,name,param1,param2,body) func(vec2,name,param1,param2,body) func(vec3,name,param1,param2,body) func(vec4,name,param1,param2,body)
//define two "generic" functions using this macro
generic(add,a,b,
return a + b;
)
generic(sub,a,b,
@antiboredom
antiboredom / index.html
Created December 15, 2014 16:36
A simple example showing how to save animated gifs from p5.js sketches, using https://github.com/jnordberg/gif.js
<html>
<head>
<script src="gif.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/p5.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/addons/p5.dom.js"></script>
<script src="sketch.js"></script>
</head>
<body>
<p>First, allow camera access.<p><p>Then click once to start recording, and another time finish recording and make a gif.</p>
</body>

Twitter abuses all media file uploads, each type in its own way. If we want to upload a good looking animation loop from some low-color, high-detail generative art, we have to game their system's mechanisms.

  • don't upload a video file, they will re-encode it into absolute 💩

  • create a GIF, which they will auto-convert into a video file 😱

  • The frames of the GIF will be resized to an even-sized width using an extremely naive algorithm. Your GIF should be an even size (1000, 2000,