Skip to content

Instantly share code, notes, and snippets.

View judexzhu's full-sized avatar
🎯
Focusing

Jude Zhu judexzhu

🎯
Focusing
View GitHub Profile
@judexzhu
judexzhu / gist:ff8e3db22bcdc5c3d3dc790410404bf1
Created September 24, 2021 16:08 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@judexzhu
judexzhu / youtube2mp3.py
Created June 19, 2021 06:17 — forked from benzap/youtube2mp3.py
Youtube to MP3 Downloader Script
#!/bin/env python
# Requires: youtube_dl module
# Requires: ffmpeg
# Usage:
#
# python youtube2mp3.py <URL>, ...
#
# Example:
#
# python youtube2mp3.py https://www.youtube.com/watch?v=dQw4w9WgXcQ
@judexzhu
judexzhu / rem_proxmox_popup.sh
Created July 10, 2018 06:39 — forked from natesubra/rem_proxmox_popup.sh
Remove PROXMOX 5.2 subscription message popup
#!/bin/sh
#######################################################
#
# Edits the proxmox Subscription file to make it
# think that it has a Subscription.
#
# Will disable the annoying login message about
# missing subscription.
#
@judexzhu
judexzhu / proxmox-subscription-disable.sh
Created July 9, 2018 08:40 — forked from kvaps/proxmox-subscription-disable.sh
Proxmox disable subscription window permanent patch
cat > /etc/systemd/system/pve-patcher.service <<EOT
[Unit]
Description=PVE subscription popup disabler
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sed -i "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/js/pvemanagerlib.js /usr/share/pve-manager/touch/pvemanager-mobile.js
[Install]
@judexzhu
judexzhu / del_cluster.sh
Created July 9, 2018 08:13 — forked from ianchen06/del_cluster.sh
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# edit through sqlite, check, delete, verify
@judexzhu
judexzhu / sysctl.conf
Created February 10, 2018 12:13 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@judexzhu
judexzhu / sysctl.conf
Created December 28, 2017 07:11 — forked from sokratisg/sysctl.conf
Tuned sysctl.conf for use by CentOS/RHEL 6.x or later
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Turn on execshield
# 0 completely disables ExecShield and Address Space Layout Randomization
# 1 enables them ONLY if the application bits for these protections are set to “enable”
# 2 enables them by default, except if the application bits are set to “disable”
# 3 enables them always, whatever the application bits
@judexzhu
judexzhu / format_script.sh
Created December 27, 2017 06:01
Format disk, only run once
#!/bin/bash
lsblk
echo -n "Enter disk name and press [ENTER]: "
read disk
echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/$disk
mkfs.xfs -f /dev/$disk
@judexzhu
judexzhu / yaml
Created May 6, 2017 02:52
Helm deploy Gitlab-ce
REVISION: 1
RELEASED: Fri May 5 19:47:55 2017
CHART: gitlab-ce-0.1.7
USER-SUPPLIED VALUES:
storageClass: ceph
COMPUTED VALUES:
httpPort: 80
httpsPort: 443
image: gitlab/gitlab-ce:9.0.0-ce.0