Skip to content

Instantly share code, notes, and snippets.

View Klustre's full-sized avatar

Remco Janssen Klustre

View GitHub Profile
@justintaylor-dev
justintaylor-dev / get-and-set-metadata-in-ae.jsx
Created January 13, 2023 21:39
Get and Set Metadata in AE #code_aeft
function setAeMetadata(propName, propValue) {
if (ExternalObject.AdobeXMPScript === undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
}
if (!app.project || !ExternalObject.AdobeXMPScript || !XMPMeta) return;
var prefix = "xmp:";
var uri = XMPMeta.getNamespaceURI(prefix);
var newPropName = prefix + propName;
var metadata = new XMPMeta(app.project.xmpPacket);
metadata.setProperty(uri, newPropName, propValue.toString());
@ks2211
ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active January 31, 2024 05:08
Phoenix with esbuild, fortawesome, and tailwindcss
Phoenix esbuild with Tailwind+Fontawesome
@eeropic
eeropic / scriptui-svg-alpha.jsx
Created September 2, 2021 09:04
scriptui-svg alpha
// @target aftereffects
// altKeyPressed(win), optKeyPressed(mac) ctrlKeyPressed, cmdKeyPressed(mac), shiftKeyPressed, capsLockKeyPressed, numLockKeyPressed
// leftButtonPressed, middleButtonPressed, rightButtonPressed, mouseOver, hasFocus,
//encapsulate the script in a function to avoid global variables
(function (thisObj) {
default xml namespace = "http://www.w3.org/2000/svg";
var xmlString = """
<!-- Generator: Adobe Illustrator 23.1.1, SVG Export Plug-In -->

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@Tom003
Tom003 / Draw Shape Expression.js
Last active March 14, 2024 20:34
Draw a shape based on input values
/************************************************************************************
Draw Shape Expression v1.02
Description: Draws a parametric rectangle path
Author: Thomas Alberti <ta@thomasalberti.com>
************************************************************************************/
function getMatrixComposite(tMatrix1, tMatrix2){ // Multiply matrices, 2x2 * 2x2
let cMatrix = [];
for(let j = 0; j <= 1; j++) {
cMatrix[j] = [];
@WebReflection
WebReflection / custom-elements-pattern.md
Last active May 17, 2024 23:30
Handy Custom Elements' Patterns

Handy Custom Elements' Patterns

Ricardo Gomez Angel Photo by Ricardo Gomez Angel on Unsplash

This gist is a collection of common patterns I've personally used here and there with Custom Elements.

These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.

@yone80
yone80 / roll.js
Last active August 21, 2018 10:21
Roll - Aftereffects Expression
numsegments = Math.max(2, Math.floor(effect("Segments")("Slider")));
totallength = Math.max(0.001, effect("Line Length")("Slider"));
seglength = totallength / numsegments;
sepdist = Math.max(0.001, effect("Seperation Distance")("Slider") * 0.5) / (Math.PI * 2);
roll = clamp(effect("Roll")("Slider"), 0, 1);
pos = [0, 0];
cv = [];
firsttheta = Math.sqrt(numsegments * seglength / sepdist);
@yone80
yone80 / circleshape.js
Created October 23, 2017 14:10
Circle shape - Aftereffects Expression
seg = Math.floor( Math.max(effect("Segments")("Slider"), 2) );
radius = effect("Radius")("Slider");
angle_param = clamp(effect("Angle Control")("Angle"), -360, 360);
close = effect("Close")("Checkbox") > 0;
angle = degreesToRadians(angle_param) * 1 / seg;
tangent = [0, 4 / 3 * Math.tan(angle/4) ] * radius;
firsttangent = [0,0];
numiterations = seg + 1;
@firatkucuk
firatkucuk / delete-slack-messages.js
Last active July 1, 2024 15:26
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
@liabru
liabru / save-file-local.js
Created April 24, 2014 17:46
Save a text file locally with a filename, by triggering a download in JavaScript
/*
* Save a text file locally with a filename by triggering a download
*/
var text = "hello world",
blob = new Blob([text], { type: 'text/plain' }),
anchor = document.createElement('a');
anchor.download = "hello.txt";
anchor.href = (window.webkitURL || window.URL).createObjectURL(blob);