Skip to content

Instantly share code, notes, and snippets.

View suryastef's full-sized avatar

Surya Stefanus suryastef

View GitHub Profile
@suryastef
suryastef / pylyght.py
Created May 19, 2025 20:17
pylynt + pyright
#!/usr/bin/env python3
"""
Combined Python code checker that runs both Pyright and Pylint
"""
import subprocess
import sys
from pathlib import Path
def run_pyright(target_path: str) -> bool:
@suryastef
suryastef / uninstall-google-cloud-ops-agent.sh
Last active December 4, 2025 20:55
Uninstall google-cloud-ops-agent, used by GCP monitoring and logging for GCE instances
# This will remove google-cloud-ops-agent installation
curl -fsSL https://raw.githubusercontent.com/GoogleCloudPlatform/getting-started-python/refs/heads/main/gce/add-google-cloud-ops-agent-repo.sh | bash -s -- --uninstall --remove-repo
# Reference can be found here: https://github.com/GoogleCloudPlatform/getting-started-python/blob/main/gce/add-google-cloud-ops-agent-repo.sh
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 39 (Thirty Nine)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount -o rw /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition, use '-o remount,rw' instead when the system back to RO state
$ ls /mnt/boot/efi # should show all OS names under EFI
@suryastef
suryastef / trigger-workflow-example.yaml
Last active January 6, 2023 19:08
Article Source Code
name: Trigger Workflow Example
on:
push:
branches: ["master"]
workflow_dispatch:
jobs:
trigger-website:
runs-on: ubuntu-latest
@suryastef
suryastef / odoo10 on xenial.sh
Last active October 4, 2021 08:43
Install Odoo ERP platform on Linux Ubuntu
# My recommendation, run these commands inside tmux
apt update && apt install -y tmux
# Set local
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LANGUAGE=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8
sudo update-locale LC_CTYPE=en_US.UTF-8