This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mindepth=0 | |
maxdepth=0 | |
original_dir=$(pwd) | |
print_help() { | |
echo "Usage: $0 [OPTION]..." | |
echo "Create videos from PNG files in directories." | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as MP4Box from 'mp4box'; | |
// returns a Promise that resolves to video metadata using MP4Box.js | |
export const getMp4Info = async (videoBlob) => { | |
const mp4boxfile = MP4Box.createFile(); | |
return new Promise((resolve, reject) => { | |
mp4boxfile.onReady = function (info) { | |
resolve(info); | |
}; | |
mp4boxfile.onError = function (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# pip install Pillow | |
from PIL import Image | |
def replace_transparent_pixels(base_image_path, replacement_image_path, output_image_path): | |
base_image = Image.open(base_image_path) | |
replacement_image = Image.open(replacement_image_path) | |
base_image = base_image.convert("RGBA") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.refs "for-each-ref refs/ --sort=committerdate --format='%(color:red)%(committerdate:short) %(color:yellow)%(objectname:short) %(align:25,left)%(color:cyan)%(refname:short)%(end) %(color:magenta)%(subject) %(color:green)%(authorname)'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofApp.h" | |
using namespace cv; | |
using namespace ofxCv; | |
using namespace ofxVimba; | |
#define PAUSE_EXIT_FAILURE cout << "press any key to quit" << endl; std::cin.get(); ofExit(EXIT_FAILURE); | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
import os | |
def convert(file_in, dir_out=""): | |
with open(file_in, 'r', encoding='utf8') as json_file: | |
data = json.load(json_file) | |
for account in data["accounts"]: | |
print(f"Processing account: {account['attrs']['name']}") | |
for vault in account["vaults"]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const clone = (objIn) => { | |
if (objIn === null || typeof (objIn) !== 'object') { | |
return objIn; // must be object to clone, otherwise we return value | |
} | |
const objOut = Array.isArray(objIn) ? [] : {}; | |
Object.keys(objIn).forEach((key) => { | |
objOut[key] = clone(objIn[key]); | |
}); | |
return objOut; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sean Parent. Inheritance Is The Base Class of Evil. Going Native 2013 | |
// Video: https://www.youtube.com/watch?v=bIhUE5uUFOA | |
// Code : https://github.com/sean-parent/sean-parent.github.io/wiki/Papers-and-Presentations | |
/* | |
Copyright 2013 Adobe Systems Incorporated | |
Distributed under the MIT License (see license at | |
http://stlab.adobe.com/licenses.html) | |
This file is intended as example code and is not production quality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# list-of-addons-git.sh | |
# | |
# to be run inside of an openFrameworks project with 'addons.make' file. | |
# writes 'addons.git.make' - list addons and git repo urls, branches, and commits to 'addons.git.make' file | |
INPUT="addons.make" # addons list file | |
OUTPUT="addons.git.make" # output file |
NewerOlder