Skip to content

Instantly share code, notes, and snippets.

@maranemil
maranemil / transformKeys.php
Created May 22, 2022 16:33 — forked from goldsky/transformKeys.php
Convert under_score type array's keys to camelCase type array's keys and likewise
<?php
/**
* Convert under_score type array's keys to camelCase type array's keys
* @param array $array array to convert
* @param array $arrayHolder parent array holder for recursive array
* @return array camelCase array
*/
public function camelCaseKeys($array, $arrayHolder = array()) {
$camelCaseArray = !empty($arrayHolder) ? $arrayHolder : array();
@maranemil
maranemil / myscript.sh
Created October 17, 2021 19:31 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@maranemil
maranemil / glitch.sh
Created March 15, 2021 00:04
FFMPEG simple Glitch FX
ffmpeg -i in.mp4 -vf "
split [main][tmp];
[tmp]
lutyuv=y=negval:enable='(between(t,3,3.1))',
lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2':enable='(between(t,3,3.4))',
lutyuv="y=3*val":enable='(between(t,3,3.4))',
hue=s=3:enable='(between(t,3,3.4))',
eq=contrast=3:enable='(between(t,3,3.4))',
@maranemil
maranemil / videolist.txt
Last active November 30, 2020 10:07
Video Mix FUMIX 087
Credits for visuals:
Taryn Ashleigh Elliott https://www.instagram.com/tea_for_taryn/?hl=de
Peanut Butter Visuals https://www.instagram.com/peanutbuttervisuals/
Cinema Professionals https://www.instagram.com/thatbluemymind/
Paulo Renato https://www.instagram.com/paulorenato/
Pixabay https://www.instagram.com/pixabay/?hl=de
Piotr Wróbel https://www.instagram.com/ats_dron/
Paulo Renato https://www.instagram.com/paulorenato/
James Cheney https://www.instagram.com/cheneymediaproductions/
@maranemil
maranemil / videolist.txt
Last active November 30, 2020 10:06
Video Mix FUMIX 085
https://www.pexels.com/de-de/video/854638/ https://www.pexels.com/de-de/video/854662/
https://www.pexels.com/de-de/video/854697/ https://www.pexels.com/de-de/video/855257/
https://www.pexels.com/de-de/video/856077/ https://www.pexels.com/de-de/video/856666/
https://www.pexels.com/de-de/video/857026/ https://www.pexels.com/de-de/video/857069/
https://www.pexels.com/de-de/video/1234161/ https://www.pexels.com/de-de/video/1321208/
https://www.pexels.com/de-de/video/1390942/ https://www.pexels.com/de-de/video/1416529/
https://www.pexels.com/de-de/video/1448735/ https://www.pexels.com/de-de/video/1550080/
https://www.pexels.com/de-de/video/1649831/ https://www.pexels.com/de-de/video/1739010/
https://www.pexels.com/de-de/video/1806115/ https://www.pexels.com/de-de/video/2099595/
https://www.pexels.com/de-de/video/2257002/ https://www.pexels.com/de-de/video/2386442/
@maranemil
maranemil / ffmpeg.md
Created October 30, 2020 13:02 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@maranemil
maranemil / read_serial.py
Last active May 29, 2020 09:11
Python3 Read serial COM1 - simulate input Linux
# !/usr/bin/python
# sudo apt install python3-pip
# pip3 install pyxid
# sudo pip3 install --upgrade pyserial
# pip3 install --ignore-installed pyserial
# sudo apt-get install python3-serial
# python3 -c "import serial; print(serial.VERSION); print(serial.__dict__.keys()); print(serial.__file__)"
@maranemil
maranemil / batch.sh
Last active April 28, 2020 06:07
FFMPEG Matrix 4x4 Overlay
#!/bin/sh
# resize
ffmpeg -loglevel quiet -stats -i video01.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1A.mp4
ffmpeg -loglevel quiet -stats -i video02.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1B.mp4
ffmpeg -loglevel quiet -stats -i video03.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1C.mp4
ffmpeg -loglevel quiet -stats -i video04.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1D.mp4
ffmpeg -loglevel quiet -stats -i video05.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1E.mp4
ffmpeg -loglevel quiet -stats -i video06.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1F.mp4
ffmpeg -loglevel quiet -stats -i video07.mp4 -vf "scale=960:540" -crf 20 -threads 6 -t 15 -y video1G.mp4
@maranemil
maranemil / kaleidoskop.sh
Created April 22, 2020 19:28
Kaleidoskop ImageMagick Delanuay
#!/bin/bash
convert example4.png +flop ref.png
cp ref.png flip1.png
convert flip1.png +flop flip3.png
convert flip3.png +flip flip2.png
convert flip2.png +flop flip4.png
convert flip3.png flip1.png -rotate 90 -append out1.png
@maranemil
maranemil / delauna_triangulation.js
Created December 27, 2019 20:38
Delaunay triangulation Javascript
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Triangulation Image Generator - js do it</title>
<meta name="Description" content="jsdo.it - share JavaScript, HTML5 and CSS - "/>
<meta name="Keywords" content="JavaScript,HTML5,CSS"/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<!--
python -m SimpleHTTPServer