Skip to content

Instantly share code, notes, and snippets.

View Strykar's full-sized avatar
💭
What is Bash?

Avinash H. Duduskar Strykar

💭
What is Bash?
  • India
View GitHub Profile
@Strykar
Strykar / update_sqm.sh
Last active January 23, 2023 02:23
Update SQM limits in openwrt 4 times a day
#!/bin/sh
# v0.1 Avinash H. Duduskar <strykar@live.com>
# This adjusts OpenWRT SQM settings by re-calculating up/down bandwidth
# Needs the Speedtest.net CLI binary - https://www.speedtest.net/apps/cli
# Call this script every 4 or 6 hours via cron
set -euf -o pipefail
_sqm_int="queue" # Your actual wan interface: ifstatus wan | grep -e l3_device
_pul="90" # Percentage of wan upload speed to set, 90-95 is good
_pdl="95" # Percentage of wan download speed to set, 90-95 is good
@Strykar
Strykar / owrt_ncurses-Makefile
Created December 17, 2020 07:14
Attempts at building Openwrt ncurses package with the tic and tput binaries to get htop to work with the kitty terminal
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ncurses
==========
VULKANINFO
==========
Vulkan Instance Version: 1.2.153
Instance Extensions: count = 17
===============================
VK_EXT_acquire_xlib_display : extension revision 1
@Strykar
Strykar / failover.sh
Last active November 3, 2022 21:03 — forked from Apsu/failover.sh
An example failover script for dual WAN, using a ping healthcheck and managing default routes appropriately
#!/bin/bash -x
set -euf -o pipefail
# Test if sudo exists, comment out if sudo isn't installed
command -v sudo >/dev/null 2>&1 || { printf 'I require to be run as root, or sudo to be installed. Aborting. \n' >&2; exit 1; }
# Setting gateway's needs root privileges, elevate with sudo, tested on kernel 5.8.5-arch1-1.
# Comment out if script is called as root
if [ "$EUID" != 0 ]; then
sudo "${BASH_SOURCE[0]}" "$@"
@Strykar
Strykar / Ucenter_Ublox-Linux
Created July 1, 2020 04:49
Connect to your Ublox GPS on a Linux machine from Ucenter on Windows.
socat -v /dev/cuaU0,ispeed=115200,ospeed=115200,echo=0,raw TCP4-LISTEN:1234,reuseaddr,nodelay
#!/usr/bin/env python
# coding=utf-8
#
# Python Script
#
# Copyleft © Manoel Vilela
#
#
from argparse import ArgumentParser
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos

Keybase proof

I hereby claim:

  • I am Strykar on github.
  • I am strykar (https://keybase.io/strykar) on keybase.
  • I have a public key whose fingerprint is EA0E A7D8 75BB 7760 4FFA 4040 44AE C75A 17CB 3085

To claim this, I am signing this object:

IgnorePath '/etc/ld.so.cache' # "File containing an ordered list of libraries found in the directories specified in /etc/ld.so.conf, as well as those found in the trusted directories."
IgnorePath '/usr/share/info/dir'
IgnorePath '/var/lib/logrotate.status'
IgnorePath '/var/lib/upower/history-*.dat'
IgnorePath '/etc/udev/hwdb.bin' # https://www.freedesktop.org/software/systemd/man/hwdb.html
IgnorePath '/usr/lib/udev/hwdb.bin' # https://www.freedesktop.org/software/systemd/man/hwdb.html
IgnorePath '/usr/lib/locale/locale-archive'
IgnorePath '/etc/gconf/gconf.xml.defaults/%gconf-tree.xml'
IgnorePath '/var/lib/systemd/catalog/database' # Message catalog cache
IgnorePath '/var/lib/systemd/coredump/core.*.lz4' # Core dumps
# This will probably be need to run again after setting up weechat and restarting it.
/buffer_autoset add core.weechat notify 3
/buffer_autoset add irc.server.* notify 3
/buffer_autoset add relay.relay.list short_name relay
/buffer_autoset add core.weechat localvar_set_my_control 1
/buffer_autoset add core.highmon localvar_set_my_control 1
/buffer_autoset add core.chanmon localvar_set_my_control 1
/buffer_autoset add irc.freenode.##news localvar_set_my_control 1
/buffer_autoset add irc.freenode.##news short_name news