I hereby claim:
- I am jerieljan on github.
- I am jerieljan (https://keybase.io/jerieljan) on keybase.
- I have a public key ASCF6k9MLYGsujm1UDnNb8A1F6Qon0h2e5DNSlAWYJEkiwo
To claim this, I am signing this object:
#!/bin/sh | |
## A simple shell script that consistently observes a directory and synchronizes its contents when changes are found, using rsync's one-way sync. | |
## Most of the heavy lifting is really done by rsync, so what this script provides is just convenience over cron, notifications (if you have notify-pb) and rsync not being spammed by said cron job through a simple lockfile. | |
## simple-sync requires rsync, notify-pb (Pushbullet) and preferably run by a scheduler such as cron. | |
# Core variables | |
SYNC_HOME='/home/user' | |
SYNC_SOURCE='user@server.com:/path/to/source/*' | |
SYNC_DESTINATION="${SYNC_HOME}/path/to/destination/" |
#!/bin/bash | |
# This script splices a movie file into multiple parts. | |
# First parameter for the number of X screens | |
# Second parameter for the number of Y screens | |
X_COUNT=$1 | |
Y_COUNT=$2 | |
FILENAME="trimmed.mkv" |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# This simple script processes screenshots taken with a PS3 and does multiple things: | |
# - Crops the image to a preferred size (this depends on the game used, remove if desired, or adjust as needed.) | |
# - Renames all images by sequence, sorted by modification date (dates are copied to the new files) | |
# Prepare a file list, sorted by modification date. | |
rm FILELIST 2>/dev/null | |
ls -tdr1 *.png > FILELIST; |
#!/bin/bash | |
# This simple script processes screenshots taken with a PS3 and does multiple things: | |
# - Changes all PNG files to JPG using imagemagick | |
# - Compresses all files into Lepton-format images | |
# - Reapplies the original modification date for metadata retention. | |
# Prepare a file list, sorted by modification date. | |
rm FILELIST 2>/dev/null | |
ls -tdr1 *.png > FILELIST; |
I use PlantUML a lot. It's what I use for drawing all sorts of diagrams and it's handy because of its easy markup (once you get used to it) while making things easy to maintain as projects grow (thanks to version control)
This gist explains how I do my PlantUML workspace in a project.
globals
directory for all diagrams to follow (like the "stylesheet" below) to keep things consistent.stylesheet.iuml
file that keeps the use of colors consistent through use of basic FOREGROUND, BACKGROUND and ACCENT colors.style-presets.iuml
file defines these colors so you can make "presets" or "themes" out of them.stylesheet.iuml
, you'll need the Roboto Condensed and Inconsolata fonts for these to work properly.example-sequence.puml
for example: https://imgur.com/Klk3w2FExporting diagrams and sharing them is just business as usual; especially if it comes in PNG or JPG.
But what if you could make them better?
Well, yeah, you can by exporting them to a vector format like SVG or a PDF document. That way, details are drawn in 2D points and math and won't lose any detail if you zoom in.
import com.fasterxml.jackson.databind.JsonNode | |
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | |
/** | |
* | |
* | |
* Date: 2019-03-05 | |
* Time: 11:03 AM | |
* @author jerieljan | |
*/ |
#!/usr/bin/env bash | |
# Usage: | |
# - Install `tesseract` with `brew install tesseract` | |
# - In BetterTouchTool, create a trigger of your choice. | |
# (I recommend a Keyboard Shortcut with Cmd+Shift 6) | |
# - Add an Execute Shell Script / Task action | |
# - Paste this script. | |
# NOTE: You'll need to authorize BTT to the Screen Recording permission in Security and Privacy at System Preferences |
#!/usr/bin/env bash | |
### | |
# whisper-cpp - a shell script that easily creates subtitles out of movie files and muxes them. | |
# | |
# Requirements | |
# - ffmpeg | |
# - whisper.cpp | |
# - Make sure to run https://github.com/ggerganov/whisper.cpp#quick-start first! | |
# |