Skip to content

Instantly share code, notes, and snippets.

View ochen1's full-sized avatar
๐Ÿ‘‹
Hello, world!

Oliver Chen ochen1

๐Ÿ‘‹
Hello, world!
View GitHub Profile
@ochen1
ochen1 / PasswordlessSudo.sh
Created September 19, 2020 19:47
A script to disable asking for password when using sudo.
#!/bin/bash
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
@ochen1
ochen1 / pip3-update.sh
Created January 1, 2021 15:39
Update Python PIP Packages
#!/bin/bash
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
@ochen1
ochen1 / example.py
Last active November 6, 2021 22:13
Google Login
from signal import pause
from rich.console import Console
from google_login import *
console = Console()
console.log("Initializing ChromeOptions...")
options = webdriver.ChromeOptions()
options.headless = False
@ochen1
ochen1 / answerfile
Last active February 21, 2021 22:44 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@ochen1
ochen1 / novnc_show_local_cursor.patch
Created March 26, 2021 16:15
NoVNC patch to show local cursor
--- core/display.js.bak 2021-03-26 16:10:05.826957824 +0000
+++ core/display.js 2021-03-26 16:10:41.667264310 +0000
@@ -507,7 +507,7 @@
},
disableLocalCursor: function () {
- this._target.style.cursor = "none";
+ // this._target.style.cursor = "none";
},
@ochen1
ochen1 / profile.ps1
Created January 9, 2025 08:00
Lazy load conda in PowerShell (drop-in replacement)
# ~/Documents/WindowsPowerShell/profile.ps1
function Conda {
# Check if the initialization has already been performed
if (-not $global:CondaInitialized) {
# Perform the initialization
if (Test-Path "C:\ProgramData\miniconda3\Scripts\conda.exe") {
(& "C:\ProgramData\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression
} else {
Write-Error "Conda executable not found at the specified path."
@ochen1
ochen1 / litterbox
Created January 12, 2025 08:00 — forked from MineBartekSA/litterbox
LitterBox - A implementation of litterbox.catbox.moe API in bash
#!/bin/bash
#
# LitterBox v1.0 - Safe for filenames with spaces
# An implementation of litterbox.catbox.moe API in Bash
# Author: MineBartekSA (Original Script)
# Modified for safer filename handling
# Check if cURL is installed
if ! command -v curl &> /dev/null; then
echo -e "\e[91mcURL not found!\e[0m"