Skip to content

Instantly share code, notes, and snippets.

View favoyang's full-sized avatar

Favo Yang favoyang

View GitHub Profile
@favoyang
favoyang / Restart-TdxW.ps1
Created August 7, 2022 02:36
The PowerShell script to restart TdxW processes
$processes = Get-Process TdxW
foreach($process in $processes)
{
write-host Restarting: $process.MainWindowTitle
#Get the process details
$procID = $process.Id
$cmdline = (Get-WMIObject Win32_Process -Filter "Handle=$procID").CommandLine
# Kill and wait
$process.Kill()
$process.WaitForExit()
@favoyang
favoyang / README.md
Last active January 21, 2021 10:38
Monkey patch wagtailimages_tags.image tag to resolve specs from a context variable.

Monkey patch wagtailimages_tags.image tag to resolve specs from a context variable.

wagtail/wagtail#2090

Usage:

  • Place the patch file into one of your templatetags folder.
  • Load the patch after the wagtailimages_tags in your template file.
@favoyang
favoyang / plex-proxy-settings-for-scrapper.md
Last active December 2, 2021 09:28
The guideline to set up Plex to access scraper API via proxy on macOS

The Guideline to Setup Plex to Access Scraper API via Proxy on macOS

Similar questions:

This post helps you set up plex to access scraper API (thetvdb for example) via your proxy on macOS. Plex doesn't respect the system-level sock proxy (in Network settings), but it respects the HTTP_PROXY and HTTPS_PROXY variables.

---
git:
commitMessage: 'chore: release v${version}'
changelog: npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs
github:
release: true
npm: false
version: "1"
rules:
# hardreset local master with upstream
- base: master
upstream: yasirkula:master
mergeMethod: hardreset
# create pull request when local master is updated
- base: upm-convert
upstream: master
{
"tagFormat": "v${version}",
"plugins": [
["@semantic-release/commit-analyzer", { "preset": "angular" }],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "preset": "angular" }],
["@semantic-release/npm", { "npmPublish": false, "pkgRoot": "Packages/com.littlebigfun.semantic-release-upm-example" }],
["@semantic-release/git", {
"assets": ["Packages/com.littlebigfun.semantic-release-upm-example/package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
@favoyang
favoyang / ci.yml
Last active April 20, 2020 13:25
GitHub actions to automate semantic-release with upm branch. https://medium.com/openupm/how-to-maintain-upm-package-part-2-f352fbf5f87c#6bf4
name: CI
on:
push:
branches:
- master
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
{
"tagFormat": "v${version}",
"plugins": [
["@semantic-release/commit-analyzer", { "preset": "angular" }],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "preset": "angular" }],
["@semantic-release/npm", { "npmPublish": false }],
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
name: CI
on:
push:
branches:
- master
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
@favoyang
favoyang / ci.yml
Last active August 7, 2023 15:16
GitHub actions to create the upm branch and handle "Samples" folder. https://medium.com/openupm/how-to-maintain-upm-package-part-1-7b4daf88d4c4#236a
name: CI
on:
push:
branches:
- master
jobs:
split-upm:
name: split upm branch (force)
runs-on: ubuntu-latest
steps: