Skip to content

Instantly share code, notes, and snippets.

View attilaolah's full-sized avatar
🌳
Hacking on jasen.org.rs

Attila Oláh attilaolah

🌳
Hacking on jasen.org.rs
View GitHub Profile
@attilaolah
attilaolah / README.md
Created October 1, 2022 11:31
Systemd service for creating in-memory cache directory on login

Create the file under ~/.config/systemd/user/, then enable the service with systemctl --user enable cache.service.

@attilaolah
attilaolah / cleanup.sh
Created October 1, 2022 10:37
Arch System Cleanup
# Clean up the package manager cache:
yay --sync --clean
# Clean up the Nix store:
nix-store --gc
# Clean up system journals, except the past two days:
journalctl --vacuum-time=2d
# DANGER ZONE:
@attilaolah
attilaolah / fix_sony_arw.sh
Created April 30, 2022 11:36
Fix SONY ARW timestamps (after forgetting to change time zone)
# Fix time offset:
export TZ=GMT+2
$ exiftool '-FileModifyDate<${SonyDateTime2}+00:00' .
$ exiftool '-CreateDate<${FileModifyDate}' '-ModifyDate<${FileModifyDate}' '-DateTimeOriginal<${FileModifyDate}' '-SonyDateTime<${FileModifyDate}'
# Geotag using UTC timestamps:
$ for gpx in *.gpx; exiftool -geotag "${gpx}" '-Geotime<${SonyDateTime2}+00:00' .
# Clean up:
$ exiftool -delete_original .
@attilaolah
attilaolah / docker-compose.yml
Created March 27, 2022 12:27
AdGuard Home / Docker Compose
version: "3.8"
services:
adguard_home:
# AdGuard Home server.
image: adguard/adguardhome
ports:
# DNS:
- 53:53/tcp
- 53:53/udp
@attilaolah
attilaolah / BleLssService.java
Created February 10, 2022 01:11
NIKON UUIDs, decompiled from the SnapBdrige APK.
public class BleLssService {
public static final UUID AUTHENTICATION = UUID.fromString("00002000-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID BATTERY_LEVEL = UUID.fromString("00002A19-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID CLIENT_DEVICE_NAME = UUID.fromString("00002002-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID CONNECTION_CONFIGURATION = UUID.fromString("00002004-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID CONNECTION_ESTABLISHMENT = UUID.fromString("00002005-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID CURRENT_TIME = UUID.fromString("00002006-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID DESCRIPTOR = UUID.fromString("00002902-0000-1000-8000-00805F9B34FB");
public static final UUID LOCATION_INFORMATION = UUID.fromString("00002007-3DD4-4255-8D62-6DC7B9BD5561");
public static final UUID LSS_CABLE_ATTACHMENT = UUID.fromString("0000200A-3DD4-4255-8D62-6DC7B9BD5561");
@attilaolah
attilaolah / civ.sh
Created December 5, 2021 11:18
Kinglet Launcher
#!/usr/bin/env bash
ROOT="${HOME}/legendary"
GAMEDIR="${ROOT}/SidMeiersCivilizationVI"
DXVK="1.9.1"
export WINEPREFIX="${GAMEDIR}.wine"
# Download & copy DXVK libraries.
@attilaolah
attilaolah / dl.py
Created May 1, 2021 15:56
Pokémon TV episode downloader
"""Pokemon episode downloader script.
Usage:
python dl.py https://s2.content.video.llnw.net/smedia/path/to/playlist0.ts
"""
import os
import shutil
import sys
@attilaolah
attilaolah / verify_plot_files.py
Created April 19, 2021 14:26
MASS plot file verifier
"""MASS database format verifier."""
import hashlib
import os.path
import sys
USAGE = """Usage:
{} proof_dir/*.massdb
@attilaolah
attilaolah / mapbox_dl.go
Last active January 12, 2024 19:17
Mapbox Static Tile Downloader
// Package main downloads tiles from the Mapbox Static Tiles API.
// See https://docs.mapbox.com/api/maps/static-tiles/#retrieve-raster-tiles-from-styles.
//
// Usage:
// go run mapbox_dl.go -h
package main
import (
"flag"
"fmt"
@attilaolah
attilaolah / .XCompose
Last active January 9, 2020 15:14
ChromeOS ATM NumPad
include "%L"
<KP_7>: KP_1
<KP_8>: KP_2
<KP_9>: KP_3
<KP_1>: KP_7
<KP_2>: KP_8
<KP_3>: KP_9