Skip to content

Instantly share code, notes, and snippets.

View mjaschen's full-sized avatar
😏
What's happening?

Marcus Jaschen mjaschen

😏
What's happening?
View GitHub Profile
@kaaquist
kaaquist / podman_macos.md
Last active April 2, 2024 13:20
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@jhorology
jhorology / keychron-k7.json
Created September 18, 2021 07:17
karabiner-elements complex modifications for Keychron K7
{
"title": "Keychron K7 Mac mode",
"rules": [
{
"description": "K7 Fn2 + ESC: Toggle swapping ESC/backtick(default).",
"manipulators": [
{
"description": "Enable swapping ESC/backtick",
"type": "basic",
"from": {
@Pezmc
Pezmc / fake-scan-automator.sh
Last active October 6, 2023 08:26 — forked from andyrbell/scanner.sh
Make a pdf look scanned with macOS automator as a quick action
#!/bin/bash
# This script takes a PDF or list of PDFs and outputs a file(s)
# named <file>_scanned.pdf that looks like it has been scanned
#
# Requires imagemagic and popper to be installed (brew install imagemagick poppler)
#
# Accepts: a list of files
# Usage: ./<scriptfilename> pdf1.pdf pdf2.pdf
#
# To use as a macOS automator quick action you need to:
@westonruter
westonruter / amp-reader-nav-menu.php
Last active May 9, 2022 16:35
Basic plugin which adds a nav menu to Reader mode templates in the AMP plugin. When in Reader mode, upon activation a new “AMP Reader Sidebar” nav menu location is available for assigning the desired nav menu. Temporary until closed: https://github.com/ampproject/amp-wp/issues/2044
<?php
/**
* Plugin Name: AMP Reader Nav Menu
*
* @package AMP_Reader_Nav_Menu
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
@mrbar42
mrbar42 / README.md
Last active April 20, 2024 02:57
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@inkrement
inkrement / clickhousedump
Created August 19, 2017 14:26
dump all clickhouse databases and tables
#!/bin/bash
OUTDIR=.
while read -r db ; do
while read -r table ; do
if [ "$db" == "system" ]; then
echo "skip system db"
continue 2;
@mindplay-dk
mindplay-dk / collections.md
Last active June 6, 2021 14:37
Linear collection workflow

You can have a linear workflow with the array functions.

The following is unreadable:

$output = array_reduce(
  array_map(
    function($n) { return $n ** 2; }
    array_filter($input, function($n) { return $n % 2 == 0; })
 ),
@cupracer
cupracer / varnishlog-examples.sh
Last active February 27, 2024 11:11
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@marcj
marcj / do-it.sh
Last active April 12, 2020 08:47
OSX PhpStorm, better performance - more FPS using OpenGL
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde*
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: