Skip to content

Instantly share code, notes, and snippets.

View shakahl's full-sized avatar
:electron:

Soma Szelpal shakahl

:electron:
  • Mastermind at Shakahl Ltd. • Used to made GitLab's AutoDevOps possible on GitHub Actios at getbridge.com • Did modern DevOps scale-ups at DiNG.hu • nextearth.io • omgmobile.hu • used to worked on Jasmin at Docler
  • Budapest, Hungary
  • LinkedIn in/somaszelpal
  • X @szelpalsoma
  • Facebook szelpalsoma
  • Instagram szelpalsoma
View GitHub Profile
@shakahl
shakahl / hls.sh
Created November 8, 2024 18:59 — forked from stenuto/hls.sh
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@shakahl
shakahl / hook_stdout_per_process.js
Last active October 25, 2024 08:12 — forked from pguillory/gist:729616
Hooking into Node.js stdout
var util = require('util')
function hook_stdout(callback) {
var old_write = process.stdout.write
process.stdout.write = (function(write) {
return function(string, encoding, fd) {
write.apply(process.stdout, arguments)
callback(string, encoding, fd)
}
@shakahl
shakahl / rom_suffix_codes.md
Created October 23, 2024 20:25 — forked from ramiabraham/rom_suffix_codes.md
Video game rom suffix codes (decoded)

Video game rom codes

You wouldn't download a car...


Primary rom codes

Probably what you're looking for

  • [a] Alternate (alternate version of the game, usually trying a different output method)
  • [p] Pirate
@shakahl
shakahl / arch_linux_installation_guide.md
Created October 19, 2024 09:27 — forked from mjkstra/arch_linux_installation_guide.md
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
SELECT a1.*
FROM attribute a1
WHERE a1.Name = 'referencenumber' AND a1.value LIKE '%A123%';
SELECT a0.*
FROM attribute a0
WHERE a0.userid IN (
SELECT a1.userid
FROM attribute a1
WHERE a1.Name = 'referencenumber' AND a1.value LIKE '%A123%');
@shakahl
shakahl / encoding-helpers.ps1
Created October 3, 2024 03:09 — forked from jpoehls/encoding-helpers.ps1
Convert-FileEncoding and Get-FileEncoding
<#
.SYNOPSIS
Converts files to the given encoding.
Matches the include pattern recursively under the given path.
.EXAMPLE
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8
#>
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') {
$count = 0
@shakahl
shakahl / 7-zip.psm1
Created September 21, 2024 03:31 — forked from mobzystems/7-zip.psm1
7-Zip commands for PowerShell
<#
Powershell Module 7-Zip - 7-Zip commands for PowerShell
The functions in this module call 7za.exe, the standAlone version of 7-zip to perform various tasks on 7-zip archives.
Place anywhere, together with 7za.exe and 7zsd.sfx. 7za.exe is required for all operations; 7zsd.sfx for creating self
extracting archives.
http://www.7-zip.org
Import-Module [Your path\]7-Zip
@shakahl
shakahl / README.md
Created September 5, 2024 08:32 — forked from gtello/README.md
Guide to Installing Arch Linux on a USB Drive with Persistence

Guide to Installing Arch Linux on a USB Drive with Persistence

On an Arch machine, run: sudo pacman -S arch-install-scripts to have the commands to install the OS into the USB

Run the following as root

Make sure USB is NOT mounted and format it

wipefs -a /dev/sdX where X is the assigned letter your USB is mounted on

fdisk /dev/sdX

Reference: List of iOS App URL Scheme Names & Paths for Shortcuts

Author:

Saved on: 2021-03-19, 15:52

If you've ever customized your app icons or played around with Shortcuts (previously called Workflow), you probably know how important URL scheme names are. Nearly all iOS apps assign themselves one of these names, and you need to know them if you want to add custom icons to your home screen or create a Shortcuts workflow that opens an app on your iPhone up. Finding the URL scheme name, also known as a URI scheme, for a particular app is not easy. First, you have to download the IPA file for the app — a difficult task since the iTunes 12.7 update removed iOS apps from it. When you finally find the IPA, you have to turn it into a ZIP file, show the contents of the app package, then hunt for the specific PLIST file that contains the URL schemes. It's a lot of work.

This example

@shakahl
shakahl / IO plus Array & Promise helpers.js
Created August 26, 2024 01:14 — forked from dtipson/IO plus Array & Promise helpers.js
Bare bones FP type utility lib so we can play around with functions that capture the composition of DOM read/writes, but in a pure way
// Let's make it possible to create pure functions even when we're
// dealing with impure operations that would have side effects!
// First we'll need a "Type" that can contain a (sometimes impure) function
function IO(fn) {
if (!(this instanceof IO)) {//make it simpler for end users to create a type without "new"
return new IO(fn);
}
this.runIO = fn;//IO now provides an extra control layer that allows the composition of unexecuted effects