Skip to content

Instantly share code, notes, and snippets.

@huynp1999
huynp1999 / limit-tc.sh
Created March 27, 2024 02:10 — forked from Lakshanz/limit-tc.sh
TC limiting : Helps to set maximum upload/download speed limit to your linux server/pc's selected network interface.
#!/bin/bash
# Full path to tc binary
TC=$(which tc)
#
# NETWORK CONFIGURATION
# interface - name of your interface device
# interface_speed - speed in mbit of your $interface
# ip - IP address of your server, change this if you don't want to use
@huynp1999
huynp1999 / gnome-terminal-profiles.md
Created August 7, 2023 04:10 — forked from fdaciuk/gnome-terminal-profiles.md
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

@huynp1999
huynp1999 / cluster.yaml
Created November 9, 2022 04:05
Cephadm spec file
service_type: host
hostname: ceph-mon-01
addr: 192.168.1.1
labels:
- _admin
- mon
- mgr
---
service_type: host
hostname: ceph-mon-02
@huynp1999
huynp1999 / gnome_terminal_with_google.patch
Last active October 5, 2022 01:31
Enable google search option for gnome terminal 3.44
diff --git a/src/terminal-util.cc b/src/terminal-util.cc
index b430efca..8b882ad9 100644
--- a/src/terminal-util.cc
+++ b/src/terminal-util.cc
@@ -113,7 +113,7 @@ terminal_util_show_error_dialog (GtkWindow *transient_parent,
}
}
-static gboolean
+gboolean
@huynp1999
huynp1999 / ceph-deploy.sh
Last active September 12, 2022 10:25
Onetap - Ceph lab simple script
#!/bin/bash
# this script only works on Centos 8 (maybe 7)
# first, we need to provide hostnames in /etc/hosts
# assume all osd nodes has the same number of disks (eg: vdb, vdc)
# usage:
# bash ceph-deploy.sh
admin="ceph1 ceph2 ceph3"
mon="ceph1 ceph2 ceph3"
#mds="ceph1 ceph2 ceph3"