Skip to content

Instantly share code, notes, and snippets.

View pmrowla's full-sized avatar

Peter Rowlands (변기호) pmrowla

View GitHub Profile
@pmrowla
pmrowla / rsync-force-setattr.diff
Last active September 7, 2024 12:44
patch for homebrew rsync 3.3.0 to workaround https://github.com/RsyncProject/rsync/issues/479
--- rsync.c 2024-09-07 21:36:17
+++ rsync.c.patched 2024-09-07 21:36:13
@@ -812,7 +812,12 @@
if (preserve_fileflags && F_FFLAGS(file) & ALL_IMMUTABLE)
set_fileflags(fname, F_FFLAGS(file));
#endif
- return 1;
+ /* Force setting file attributes even when file was moved. When
+ * transferring on MacOS to a SMB volume there is a race condition
+ * where the file may be renamed before the modified file times
@pmrowla
pmrowla / autoexec.cfg
Created February 24, 2022 12:47
CS:GO autoexec
// CS:GO autoexec.cfg
// misc junk
cl_autowepswitch "0" // don't use autoswitch!
hud_showtargetid "1"
cl_autohelp "0"
cl_showhelp "0"
cl_disablefreezecam "1"
// turn this back on for esea stats
cl_disablehtmlmotd 1
@pmrowla
pmrowla / chained-imports.sh
Created June 30, 2021 02:03
dvc chained/circular import example
#!/bin/bash
# set -e
# set -x
ROOT=`pwd`
REPO=$ROOT/repo
REMOTE=$ROOT/remote
REPOS=(a b c d)
@pmrowla
pmrowla / dvc-exp-migrate.py
Last active December 15, 2020 15:24
DVC experiments migration script
#!/usr/bin/env python3
"""Migrate DVC experiments from .dvc/experiments to refs/exps.
Requires DVC API.
"""
import argparse
import os
import re
#!/usr/bin/env python
# Requires:
# pip install werkzeug<1.0 flask flask-httpauth flask-session
from pathlib import Path
from flask import abort, Flask, request, send_file
from flask_session import Session
from flask_httpauth import HTTPBasicAuth, HTTPDigestAuth
@pmrowla
pmrowla / dvc_test_http_server.py
Created February 17, 2020 06:29
Simple flask app for testing dvc http remote push/pull
#!/usr/bin/env python
# Requires:
# pip install flask flask-httpauth
from pathlib import Path
from flask import abort, Flask, request, send_file
from flask_httpauth import HTTPBasicAuth, HTTPDigestAuth
app = Flask(__name__)
@pmrowla
pmrowla / lovelive-ruifan-qr.md
Created August 19, 2019 02:33
LoveLive kingblade QR values
@pmrowla
pmrowla / 00000623-0000070F.lns
Last active March 29, 2019 13:15
agls prologue example
;pylm
; Font styles:
; 0: TDecorate(count=919, unk2=4294967295, unk3=4294967295, unk4=0, unk5=0, unk6=0, unk7=4294967295, unk8=, unk9=, unk10=4294967295, unk11=4294967295)
;---------------------------------------
; BEGIN DECOMPILED SCRIPT
;---------------------------------------
<SCENARIO VER="102">
{STOPSND "BGM" "500" "PASS"}
{DELETECG "背景" "11" "2500" "0" "0" "" "0"}
<EVENT VALUE="MENUENABLED">
@pmrowla
pmrowla / dash.py
Last active January 24, 2019 07:30
segmentBase with stream=True
import itertools
import logging
import datetime
import os.path
import requests
from streamlink import StreamError, PluginError
from streamlink.compat import urlparse, urlunparse
from streamlink.stream.http import valid_args, normalize_key
from streamlink.stream.stream import Stream
@pmrowla
pmrowla / # mkvtoolnix - 2018-12-16_13-55-52.txt
Created December 16, 2018 05:03
mkvtoolnix on macOS 10.14.2 - Homebrew build logs
Homebrew build logs for mkvtoolnix on macOS 10.14.2
Build date: 2018-12-16 13:55:52