Skip to content

Instantly share code, notes, and snippets.

View wpyoga's full-sized avatar

William Poetra Yoga wpyoga

View GitHub Profile
@wpyoga
wpyoga / gist:fd66478de7b5c64b57dfd122dd0d3de2
Last active January 18, 2023 09:05
useful ffmpeg switches
ffmpeg -i input.mp4 -c:v libx264 -preset veryslow -pix_fmt yuv420p -vf scale=960:540 -crf 25 -an output.mp4
# -c:v libx264
# use libx264 for encoding
# -preset veryslow
# use the veryslow preset to produce very high quality videos
# -pix_fmt yuv420p
# use yuv420p format, suitable for most videos
@wpyoga
wpyoga / gist:1e30b5c0f088a91eb2610597ed66038b
Created October 3, 2022 12:19
debugging apt upgrade issues
Sometimes `apt upgrade` says "... packages have been kept back:".
To see the decision making:
```
$ sudo apt upgrade -oDebug::pkgProblemResolver=1
```
@wpyoga
wpyoga / gist:dd8b750d3b8eed066b9ac2461b36e88a
Last active January 17, 2023 15:05
KlikBCA: fix input type
// ==UserScript==
// @name KlikBCA: fix input type
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Fix input types in KlikBCA
// @author william.poetra@gmail.com
// @match https://ibank.klikbca.com/*.do
// @match https://ibank.klikbca.com/*.do?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=klikbca.com
// @grant none
@wpyoga
wpyoga / gist:5c1cefb572b1fa59af968420e0a9636f
Last active January 17, 2023 15:06
Mandiri MCM2: fix input type
// ==UserScript==
// @name Mandiri MCM2: fix input type
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Fix input types in Mandiri MCM2
// @author wpyoga
// @match https://mcm2.bankmandiri.co.id/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=mcm2.bankmandiri.co.id
// @grant none
// @run-at document-start
# /etc/apt/preferences.d/nosnap.pref
Package: snapd
Pin: release a=*
Pin-Priority: -10
#!/bin/sh
lsmod | grep -qs drivetemp || sudo modprobe drivetemp
echo SATA
find /sys/devices -name vpd_pg89 | while read PG89; do
dd if=$PG89 conv=swab status=none bs=1 count=40 skip=114
echo -n ' '
dd if=$PG89 conv=swab status=none bs=1 count=20 skip=80
echo -n ' '
  1. Register an Azure account

  2. Create a new organization on Azure DevOps

    • Organization settings
      • Security
        • Policies
          • Security policies
            • Allow public projects: ON
  • General
@wpyoga
wpyoga / gist:7505987415194af819b50d378c9f3771
Created May 24, 2023 06:13
get BaseSystem.dmg version info
Ventura, Big Sur, Catalina, Mojave:
7z e -so BaseSystem.dmg 'macOS Base System/System/Library/CoreServices/SystemVersion.plist'
Monterey:
7z e BaseSystem.dmg 5.hfs
7z e -so 5.hfs 'macOS Base System/System/Library/CoreServices/SystemVersion.plist'
High Sierra:
7z e -so BaseSystem.dmg 'OS X Base System/System/Library/CoreServices/SystemVersion.plist'
@wpyoga
wpyoga / gist:991e3daf783c2133d083ca0759c34133
Created June 13, 2023 04:18
vscode markdown disable list auto numbering
https://github.com/yzhang-gh/vscode-markdown/issues/283