Skip to content

Instantly share code, notes, and snippets.

View ali0une's full-sized avatar

i M@N ali0une

View GitHub Profile
@cengiz-io
cengiz-io / 99-disable-wireless-when-wired
Last active October 9, 2023 16:36
Script should be placed under `/etc/NetworkManager/dispatcher.d/` with a name like `99-disable-wireless-when-wired`. Make sure 1) root owns it 2) it's mod is 755
#!/bin/sh
IFACE=$1
ACTION=$2
ntfy () {
sudo -u cengiz \
DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
notify-send "$1" "$2"
@rawdatalab
rawdatalab / stillalive.rc
Created April 11, 2019 17:42
STILL ALIVE as a Bash script with beep (didn't create, just sharing)
# Let 'em know that we're Still Alive
# http://pastebin.com/f72f8f72d (no longer valid)
#!/bin/bash
echo -n "This "
beep -f 784 -l 200
echo -n "was "
beep -f 740 -l 200
echo -n "a "
beep -f 659 -l 200
@sammdu
sammdu / enable-tcp-bbr.sh
Last active September 19, 2023 16:27
Significantly increase TCP throughput (and thus network speed) of your Linux server. When I tried it on a VPS I own, the wget average went from 394KB/s to 1.37MB/s!
#!/usr/bin/env bash
# This is a crazy feature of the Linux kernel that will DRAMATICALLY increase
# the TCP throughput (and thus network speed) of your Linux server.
# When I tried it on a VPS I own, the wget average went from 394KB/s to 1.37MB/s!
# Further reading: https://medium.com/google-cloud/tcp-bbr-magic-dust-for-network-performance-57a5f1ccf437
# check if kernel supports TCP BBR
if ! grep 'CONFIG_TCP_CONG_BBR' /boot/config-"$(uname -r)" | grep -q 'CONFIG_TCP_CONG_BBR'; then

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.