Skip to content

Instantly share code, notes, and snippets.

@benwurth
benwurth / html-javascript-boilerplate.html
Created August 23, 2017 16:18
Get started running JavaScript code in your browser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body>
<script type="text/javascript">
// Code goes here
console.log("Hello, World!");
@benwurth
benwurth / install_ffmpeg_with_everything.sh
Created July 21, 2017 02:26
Install ffmpeg with EVERYTHING using Homebrew
brew install --force ffmpeg --with-chromaprint --with-fdk-aac --with-fontconfig --with-freetype --with-frei0r --with-game-music-emu --with-libass --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-rubberband --with-schroedinger --with-sdl2 --with-snappy --with-speex --with-tesseract --with-theora --with-tools --with-two-lame --with-wavpack --with-webp --with-x265 --with-xz --with-zeromq --with-zimg
@benwurth
benwurth / .vimrc
Last active August 26, 2016 00:04
My .vimrc
filetype plugin indent on " not so sure what this does
let python_highlight_all=1
syntax on " enables syntax processing
syntax enable " I think this is a duplicate?
set clipboard=unnamed " This sets the system clipboard to the deafault
set background=dark " gives us the wonderful "dark"
" solarized colorscheme
@benwurth
benwurth / merge-unity-mac.sh
Created January 20, 2015 19:15
UniMerge mac-driver
#!/bin/bash
## Matt Schoen
## 5-29-2013
##
## In the absence of a legitimate license (that I know of) that fits my needs, here goes: This software is the
## copyrighted material of its author, Matt Schoen, and his comapny Defective Studios. It is available for sale on
## the Unity Asset store and is subject to their restrictions and limitations, as well as the following: You shall not
## reproduce or re-distribute this software with the express written (e-mail is fine) permission of the author. If
## permission is granted, the code (this file and related files) must bear this license in its entirety. Anyone who
@benwurth
benwurth / longShadows01.jsx
Last active August 29, 2015 14:01
After Effects script for generating long shadow effects that've become so popular lately.
{
//Begin undo group
app.beginUndoGroup("Long Shadows");
/* Variables */
// Selected Comp
var rootComp = app.project.activeItem;
// Actual footage layer that the shadow is applied to
var footageLayer;
// Name of original footage layer
@benwurth
benwurth / MoveMarkersToNull.jsx
Created September 21, 2013 01:12
Simple After Effects Script that moves the markers from an AV layer to a new null layer.
app.beginUndoGroup("Move Markers to Null"); //begins the undo group
//Variables
var curItem = app.project.activeItem; //creates a variable that holds the selected comp
var curLayer = curItem.selectedLayers[0]; //creates a variable that holds the selected layer
var oldMarkers = curLayer.property("Marker");
function main()
{
var nullLayer = curItem.layers.addNull(curItem.duration); //create our null object
@benwurth
benwurth / longLineOfNumbers.jsx
Created September 21, 2013 01:10
An After Effects script that produces a long line of numbers as Text Layers. All layers are parented to a null object for easy handling.
{
//Begin undo group
app.beginUndoGroup("Long Line of Numbers");
//Variables
var minNumber = 0;
var maxNumber = 0;
function main() {
//Get minNumber
@benwurth
benwurth / HelloDolly01.jsx
Created September 21, 2013 01:04
A simple After Effects script that creates a 3D camera, creates a null objects for the dolly, parents the camera to the dolly, and adds a wiggle expression to the null object. I wrote this when I was working on some projects that required me to do this every time I made a new comp. You can tell I was tired when I came up with the name.
{
//Begins the undo group.
app.beginUndoGroup("Add Camera and Dolly");
//Creates a variable that holds the selected comp
var curItem = app.project.activeItem;
//Makes sure that there is an active comp
if (curItem === null || !(curItem instanceof CompItem))
{
@benwurth
benwurth / Bouncer(scale)01.jsx
Created September 21, 2013 00:58
A simple script for After Effects that adds an expression for Inertial Bounce to the scale property of the selected layer (as opposed to another script I wrote that affects the position).
{
//Begins the undo group
app.beginUndoGroup("Add Inertial Bounce");
//Global Variables:
var bounceExp = "n = 0;if (numKeys > 0){n = nearestKey(time).index;if (key(n).time > time){n--;}}if (n == 0){t = 0;}else{t = time - key(n).time;}if (n > 0 && t < 1){v = velocityAtTime(key(n).time - thisComp.frameDuration/10);amp = .04;freq = 2.0;decay = 8.0;value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;}";
var curItem = app.project.activeItem; //Creates variable that holds selected comp
//Functions:
function addBounce (currentLayer)
@benwurth
benwurth / Bouncer01.jsx
Created September 21, 2013 00:55
A simple script for After Effects that adds an expression for Inertial Bounce to the selected layer. Affects the position property (as opposed to another script I wrote that affects the scale).
{
//Begins the undo group
app.beginUndoGroup("Add Inertial Bounce");
//Global Variables:
var bounceExp = "n = 0;if (numKeys > 0){n = nearestKey(time).index;if (key(n).time > time){n--;}}if (n == 0){t = 0;}else{t = time - key(n).time;}if (n > 0 && t < 1){v = velocityAtTime(key(n).time - thisComp.frameDuration/10);amp = .04;freq = 2.0;decay = 8.0;value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;}";
var curItem = app.project.activeItem; //Creates variable that holds selected comp
//Functions:
function addBounce (currentLayer)