Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
for folder in ./* ; do
echo -e "${folder}"
# ffmpeg -i input.file -q:v 0 -g 1 output.file
# ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4
fBasename=$(basename "${folder}")
echo -e "${fBasename} ---"
ffmpeg -r 24 -i "${folder}/%04d.png" -c:v libx264 -q:v 0 -g 1 -vf fps=24 -pix_fmt yuv420p ${fBasename}.mp4
# ffmpeg -r 24 -i "./Cube/%04d.png" -c:v libx264 -q:v 0 -g 1 -vf fps=24 -pix_fmt yuv420p test.mp4
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
## if you want to choose the color profile
for i in *.NEF; do sips -s format jpeg --matchTo "/System/Library/ColorSync/Profiles/sRGB Profile.icc" $i --out "${i%.*}.jpg"; done
@esnho
esnho / jitter set array to matrix issue
Created September 20, 2020 10:49
jitter set array to matrix issue
// init some variables
t_jit_matrix_info out2_minfo;
char* out2_bp;
jit_object_method(out2_matrix, _jit_sym_getinfo, &out2_minfo);
jit_object_method(out2_matrix, _jit_sym_getdata, &out2_bp);
// the array
long total = 30;
long* array = new long[total * 3];
This file has been truncated, but you can view the full file.
; generated by Slic3r 1.3.0 on 2020-05-31 at 20:03:30
; external perimeters extrusion width = 0.40mm (1.95mm^3/s)
; perimeters extrusion width = 0.40mm (3.90mm^3/s)
; infill extrusion width = 0.27mm (2.50mm^3/s)
; solid infill extrusion width = 0.27mm (0.83mm^3/s)
; top infill extrusion width = 0.27mm (0.62mm^3/s)
; support material extrusion width = 0.40mm (3.25mm^3/s)
M107
@esnho
esnho / VirtualRouter.bat
Last active May 25, 2019 10:46
Windows easy virtual router, hosted network. VirtualRouter START / VirtualRouter STOP / VirtualRouter STATUS - by Fabrizio Benedetti
@ECHO OFF
IF "%~1"=="START" GOTO START
IF "%~1"=="STOP" GOTO STOP
IF "%~1"=="STATUS" GOTO STATUS
ECHO Wrong argument
@esnho
esnho / git-cli-snippets.txt
Created May 20, 2019 20:41
Useful commands to change identity on git cli
git config credential.username "username"
git config user.email "[email protected]"
git config user.name "Name Surname"
@esnho
esnho / imagemagick-loop-gif.sh
Created April 3, 2018 12:55
Create animated gif using ImageMagick
# infinite loop animated gif
convert -loop 0 -delay 100 img1.png img2.png out.gif
@esnho
esnho / RandomGraph.cs
Last active November 2, 2017 11:36
Unity UILineRenderer Random Graph
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI.Extensions;
/*
* Works with UI Line Renderer, easily replacable with the standard Unity LineRenderer
*/
public class RandomGraph : MonoBehaviour {