Skip to content

Instantly share code, notes, and snippets.

View j0yu's full-sized avatar
👌

Joe Yu j0yu

👌
View GitHub Profile

Overcooked - All You can Eat (Linux/Flatpak/Steam)

The game ID is 1243830, so to find Player.log, search inside ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/1243830

find ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/1243830 -name Player.log
~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/1243830/pfx/drive_c/users/steamuser/AppData/LocalLow/Team17/Overcooked All You Can Eat/Player.log
@j0yu
j0yu / wikquote_of_the_day.py
Last active June 15, 2021 12:34
Fetch quote of the day from Wikiquote
"""Python 3.6 and above only."""
import datetime
import re
import requests # https://docs.python-requests.org/
def get_quote(html=True, date=None):
date = date or datetime.date.today()
prefix = "https://en.wikiquote.org/wiki/Wikiquote:Quote_of_the_day"
import maya.cmds as cmds
from functools import partial
import sys
import random
from PySide2 import QtCore, QtWidgets
widget = QtWidgets.QWidget()
hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
form_layout = QtWidgets.QFormLayout() # Allows adding rows with text
@j0yu
j0yu / install-flatpak-builder-no-git.sh
Created April 25, 2021 11:44
Already have your own git but CentOS 7 yum wants to pull down git from the Jurassic period? Try this
#!/bin/bash
cd "$(mktemp -d)"
# Setup git/ and flatpak-builder/ sub-folders
# Download installation rpms into them
for PKG_NAME in git flatpak-builder
do
mkdir "$PKG_NAME"
sudo yum install \
@j0yu
j0yu / ArnoldKatanaCryptoMergeFix.lua
Created March 19, 2021 00:17
Nuke hates you because ExrCombine ruined your cryptomatte? Try this!
--[[ Call oiiotool, that's part of KtoA, to merge the cryptomatte layers properly.
$KTOA_ROOT/bin/oiiotool \
/path/to/crypto_asset.1001.exr \
--metamerge \
/path/to/crypto_material.1001.exr \
--chappend --metamerge \
/path/to/crypto_object.1001.exr \
--chappend --metamerge \
-o $OUTPUT
@j0yu
j0yu / nmcli-vpn.md
Last active March 22, 2021 10:18
CentOS 7 - Network Manager CLI (nmcli) to setup VPN CLIENT connections

If you have permissions issues, re-run it with sudo

This is for those of you who likes to do a minimal install of CentOS 7 and add things as you need them.

Pre-requisites

Install the EPEL yum repository

@j0yu
j0yu / mancomplete.md
Last active May 29, 2020 11:39
man page autocomplete

Basic bash completion for man command.

  • Known manual page names
  • man options

More could be added especially for the options for each flag but I rarely use them.

Instructions

Either have this inside your ~/.bashrc or save it somewhere and source it in your ~/.bashrc

@j0yu
j0yu / readarray-example.bash
Created May 18, 2020 11:15
Quick note on how to readarray properly
#!/bin/bash
#
# Quick note on how to readarray properly
#
# Start: List in separate LINES items in current directory
find -maxdepth 1
# WRONG! When using pipes, this actually
@j0yu
j0yu / hou_cam_shapes_parm.md
Last active March 31, 2020 13:32
Create a simple camera shape chooser in Houdini
  1. Select a node

  2. In it's parameter pane, click the cog wheel/settings icon > Edit Parameter Interface...

  3. Add a new Operator Path paramter

  4. In the Menu tab, check Use Menu and set to Replace (Field + Single Selection Menu)

  5. In the Menu Script tab, paste in

    def generate(roots):
        for root_node in filter(None, map(hou.node, roots)):

for camera in root_node.recursiveGlob("*", filter=hou.nodeTypeFilter.ObjCamera):

@j0yu
j0yu / entrypoint.sh
Last active January 28, 2020 18:47
rez ptvsd error on CentOS 7
# Run these inside: docker run --rm -it --workdir=/usr/local/src centos:7
# curl -sSL https://gist.githubusercontent.com/j0yu/649235f0683b97789f201525be2ce669/raw/9edecaf37d93467cc62ff4c8ef0a525bc4e38025/entrypoint.sh | docker run --rm -i -a stdin -a stdout -a stderr --workdir=/usr/local/src centos:7 /bin/bash -s
set -euf -o pipefail
curl -sSL https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py | python - &> /dev/null
export PATH=/opt/rez/bin/rez:$PATH
FAILED=$(mktemp)
INSTALL_OUTPUT=$(mktemp)
for MINOR in {28..52}
do