Skip to content

Instantly share code, notes, and snippets.

ffmpeg -re \
-i <filename>.mp4 \
-pix_fmt yuvj420p \
-x264-params keyint=48:min-keyint=48:scenecut=-1 \
-b:v 4500k \
-b:a 128k \
-ar 44100 \
-acodec aac \
-vcodec libx264 \
-preset medium \
@Neoklosch
Neoklosch / .bash_alias
Created October 23, 2021 19:37
Mac Bash alias
# ls aliases
alias l='ls --color'
alias ll='ls -la'
alias lt='l -rt'
alias la='l -A'
alias llt='l -lrt'
alias lla='l -lA'
alias llat='l -lArt'
# helpful aliases
@Neoklosch
Neoklosch / rename.sh
Created September 16, 2021 13:08
rename all png files
COUNTER=1
for file in *.png; do
mv "$file" "$COUNTER.png"
COUNTER=$[$COUNTER +1]
done
@Neoklosch
Neoklosch / vexels.js
Last active November 17, 2019 07:28
Vexels script
main.js
function setupGetInfo(tabId) {
const code = `(function getInfo() {
var title = document.getElementById('vector_title').innerText.toLowerCase()
.replace(" t-shirt design", "")
.replace(" tshirt design", "")
.replace("t-shirt design", "")
.replace("tshirt design", "")
.trim();
title = title[0].toUpperCase() + title.slice(1);
@Neoklosch
Neoklosch / convert.sh
Last active June 19, 2024 07:43
Convert image with color from first pixel with imagemagick
#/bin/bash
# Unzip all zip files
for f in *.zip; do unzip "$f" -d "${f%.*}"; done
# Move all jpgs to displate
find . \( -iname "*.jpg" ! -iname "*_hoodie.jpg" \) -mindepth 2 -type f -print -exec mv -f {} ../displate/ \;
cd ../displate
@Neoklosch
Neoklosch / .gitconfig
Last active November 29, 2019 14:44
git aliases
[alias]
hide = update-index
show = update-index
purge = remote prune origin
purge-dry = remote prune origin --dry-run
l = log --graph --oneline --all --decorate --topo-order
last = rebase -i HEAD~1
l2 = log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)" --all
l3 = log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n"" %C(white)%s%C(reset) %C(dim white)- %an%C(reset)" --all
@Neoklosch
Neoklosch / README.md
Created February 14, 2018 10:50 — forked from lopspower/README.md
How to Analyze & Manage Memory on Android Like a Boss

Analyze & Manage Memory on Android Like a Boss

This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.

Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.

Memory Management in Android

Android is a Linux based operating system. It uses native open source C libraries which power Linux machines. All the basic operating system operations like I/O, memory management and so on are handled by the Linux kernel. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the lifetime processes. Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memo

#!/bin/bash
CMD="./gradlew clean test"
# Check if we actually have commits to push
commits=`git log @{u}..`
if [ -z "$commits" ]; then
exit 0
fi
$CMD
#!/usr/bin/env python
import argparse
import os
import time
import signal
import sys
import gi
gi.require_version('Notify', '0.7')
@Neoklosch
Neoklosch / matrix-effect.py
Created March 28, 2017 12:57
Simple Matrix rain effect for the linux terminal
import fcntl
import time
import random
import struct
import signal
import sys
import termios
import argparse
DEFAULT_SPEED = 0.05