Skip to content

Instantly share code, notes, and snippets.

View kitswas's full-sized avatar

Swastik Pal kitswas

View GitHub Profile

Wifi Router Setup IIITH

This document provides a guide for setting up a router in your room at the International Institute of Information Technology, Hyderabad (IIITH).

Warning

All usage from the router will be attributed to the account used. Share your password with caution.

You can either get a router that works out-of-the-box (don't ask me for names, look for enterprise routers that support 802.1X auth).
Or flash a router with OpenWrt.

@kitswas
kitswas / # VirtualGamePad Profiles.md
Last active June 3, 2025 05:00
Sample profiles for VirtualGamePad

Here are a few sample profiles for VirtualGamePad.
Place them in the profiles folder.

@kitswas
kitswas / clean_repos.py
Created January 27, 2025 18:36
Git maintenance
import os
import subprocess
import sys
def run_git_command(repo_path, command):
"""Run a git command in the given repository path."""
try:
subprocess.check_call(command, cwd=repo_path)
except subprocess.CalledProcessError as e:
@kitswas
kitswas / QtKitVSCode.md
Last active December 12, 2025 20:50
Qt Kit support for CMake VSCode

Qt Kit support for CMake VSCode

How to add a kit

In VSCode, run command: (Press Ctrl+Shift+P on Windows)

CMake: Edit User-Local CMake Kits
@kitswas
kitswas / qt-class-extract.py
Last active March 8, 2024 18:56
This Python script extracts all the Qt classnames from the Qt6 documentation at https://doc.qt.io/qt-6/classes.html and writes them to a file called qt-classes.txt.
# This script extracts all the Qt classnames from the Qt documentation
# at https://doc.qt.io/qt-6/classes.html
# and writes them to a file called qt-classes.txt
import importlib
from os import system
# Modules required by this script and their pip names
modules = {"requests": "requests", "bs4": "beautifulsoup4"}
modules_installed = []
#!/bin/sh
appname=`basename $0 | sed s,\.sh$,,`
sudo chmod +x $appname
dirname=`dirname $0`
tmp="${dirname#?}"
if [ "${dirname%$tmp}" != "/" ]; then
dirname=$PWD/$dirname
@kitswas
kitswas / read_improper_csv.m
Last active June 24, 2022 13:59
Reads numbers with comma as a decimal separator from CSV files.
% -- DATA = read_improper_csv(FILE, NROWS, NCOLUMNS, DELIM, SKIP_LINES)
function data=read_improper_csv(file, nrows, ncolumns, delim=";", header_lines=0)
if (nargin() < 3 || nargin() > 5)
print_usage ();
endif
data = textscan (fopen(file, 'r'), "%s", "Delimiter", delim, "HeaderLines", header_lines);
data = cell2mat(data);
data = str2double(strrep(data,',','.'));