Skip to content

Instantly share code, notes, and snippets.

@murphytsai
murphytsai / ChatGPT-Code-Snippet-Download.js
Created June 23, 2024 14:56
ChatGPT Code Snippet Download
function debugLog(message) {
console.log(`[${new Date().toISOString()}] ${message}`);
}
function addCreateFileButton(container) {
if (container.querySelector('#update-vscode-btn')) {
debugLog('Create File button already exists in this container');
return;
}

Install Zsh and Oh-my-zsh on CentOS 7

Based on this article

ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does

This script can be copy paste to ssh as is. No hands installation. :-)

yum install zsh -y
@murphytsai
murphytsai / change_to_utc_time
Created January 7, 2022 08:59
How to # Set or Change the Time Zone in Linux( Centos)
# How to Set or Change the Time Zone in Linux( Centos)
# example : change to UTC time.
$ sudo rm -f /etc/localtime
$ sudo ln -s /usr/share/zoneinfo/UTC /etc/localtime
#Bash history without line numbers
$ history | cut -c 8-
@murphytsai
murphytsai / gist:36a2ef4dbb6d4173e312ee530da1f881
Created January 4, 2022 09:20
How to # extract(unpack) src.rpm files to current folder.
# extract tarball.src.rpm to current folder.
$ rpm2cpio ../tarball.src.rpm | cpio -i