Skip to content

Instantly share code, notes, and snippets.

Avatar
🌳
Hacking on jasen.org.rs

Attila Oláh attilaolah

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

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

@attilaolah
attilaolah / cleanup.sh
Created Oct 1, 2022
Arch System Cleanup
View cleanup.sh
# 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 Apr 30, 2022
Fix SONY ARW timestamps (after forgetting to change time zone)
View fix_sony_arw.sh
# 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 Mar 27, 2022
AdGuard Home / Docker Compose
View docker-compose.yml
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 Feb 10, 2022
NIKON UUIDs, decompiled from the SnapBdrige APK.
View BleLssService.java
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 Dec 5, 2021
Kinglet Launcher
View civ.sh
#!/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
Pokémon TV episode downloader
View dl.py
"""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 Apr 19, 2021
MASS plot file verifier
View verify_plot_files.py
"""MASS database format verifier."""
import hashlib
import os.path
import sys
USAGE = """Usage:
{} proof_dir/*.massdb
@attilaolah
attilaolah / mapbox_dl.go
Last active Dec 28, 2020
Mapbox Static Tile Downloader
View mapbox_dl.go
// 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 Jan 9, 2020
ChromeOS ATM NumPad
View .XCompose
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