Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Yrjö Kari-Koskinen ykarikos

🏡
Working from home
  • Tomorrow Tech
  • Helsinki
View GitHub Profile
@ykarikos
ykarikos / gist:5fbbd5ec8c525069b1640d3abb3d6c6c
Last active Jan 3, 2021
Download FB video and convert to mp4
View gist:5fbbd5ec8c525069b1640d3abb3d6c6c
youtube-dl "https://www.facebook.com/watch/?v=2672965476349733"
docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:3.4-scratch -i input.mkv -acodec copy -vcodec libx264 -b:v 1200k -threads 0 -f mp4 output.mp4
@ykarikos
ykarikos / 0-aggregate-audio.md
Last active Dec 5, 2020
Aggregate live microphone and music in same audio output in MacOS
View 0-aggregate-audio.md

Aggregate live microphone and music in same audio output in MacOS

Here's how you can combine the audio output of some music software (e.g. Garageband) and microphone simultaneously as the input to a streaming software (e.g. Google Meet) and your headphones. I used this setup to be able to play music from Garageband and talk in Google Meet.

1. Install Soundflower

See https://github.com/mattingalls/Soundflower/releases/

2. Setup audio devices

@ykarikos
ykarikos / Dockerfile
Last active Mar 22, 2020
Dockerfile for Planck build
View Dockerfile
FROM alpine:3.11
RUN apk update && \
apk upgrade && \
apk add --no-cache curl \
netcat-openbsd \
openjdk11 \
bash
# Download & install clojure
ENV CLOJURE_VERSION="1.10.1.466"
@ykarikos
ykarikos / docker-ssl-proxy.md
Last active Jan 27, 2020
Self-signed SSL reverse proxy with Docker
View docker-ssl-proxy.md

Self-signed SSL reverse proxy with Docker

This is based on the marvellous blog posting by Oliver Zampieri.

This howto is written to create a self signed SSL NginX proxy on MacOS to

  1. Expose proxy at local host port 5001
  2. Connect the port 5001 to port 443 inside Docker
  3. Proxy the port 443 to port 5000 on the host computer

This means that:

@ykarikos
ykarikos / openssl.MD
Created Jan 14, 2020 — forked from jchandra74/openssl.MD
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window
View openssl.MD

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@ykarikos
ykarikos / openssl_commands.md
Created Jan 10, 2020 — forked from daltonjorge/openssl_commands.md
Some list of openssl commands for check and verify your keys
View openssl_commands.md

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@ykarikos
ykarikos / FTN-Tupas.md
Last active Oct 22, 2020
Test accounts and personal ID numbers for Finnish bank authentication (FTN)
View FTN-Tupas.md
@ykarikos
ykarikos / gist:9ea231dda271fd4afef7d2bf317ca95c
Created Sep 26, 2018
Copying directories in Linux and MacOS
View gist:9ea231dda271fd4afef7d2bf317ca95c
ykk@peruna:/tmp/copytest$ uname
Linux
ykk@peruna:/tmp/copytest$ ls -lR
.:
total 0
drwxr-xr-x 2 ykk ykk 40 Sep 26 09:19 bar/
drwxr-xr-x 2 ykk ykk 100 Sep 26 09:16 foo/
./bar:
total 0
@ykarikos
ykarikos / create-spinning-gif.sh
Last active Mar 28, 2018
Create spinning and rotating gif with GraphicsMagick
View create-spinning-gif.sh
mkdir spin
for angle in `seq 360 30 690`; do gm convert original.jpg -background "#FFFFFF" -rotate $angle -crop 512x512+0+0 spin/$angle.png; done
cd spin
gm convert *.png -loop 0 -delay 20 spinningfoobar.gif
@ykarikos
ykarikos / renameVideo.pl
Created Jan 28, 2018
Rename video files with a ISO date prefix
View renameVideo.pl
#!/usr/bin/perl -w
# Rename video files with a ISO date prefix, e.g.
# rename from P12345.MOV to 2018-01-30.P12345.MOV
# Tested with MTS, 3GP and MOV files.
#
# (c) 2018 Yrjö Kari-Koskinen <ykk@peruna.fi>
# Licensed with the MIT License
use Image::ExifTool qw(:Public);