Skip to content

Instantly share code, notes, and snippets.

View sanjarcode's full-sized avatar

Sanjar Afaq sanjarcode

View GitHub Profile
@sanjarcode
sanjarcode / cloudSettings
Last active January 15, 2025 10:49
STALE, NOT IN USE vscode Settings Sync Gist
{"lastUpload":"2022-08-27T11:31:09.388Z","extensionVersion":"v3.4.3"}
@sanjarcode
sanjarcode / createTextButton.js
Last active January 18, 2021 22:48
gnome-shell-extensions snippets
// Use this in init()
function createTextButton(textP = "Click Here!", action) {
const St = imports.gi.St;
const Main = imports.ui.main;
// create button
button = new St.Bin({
style_class: "panel-button",
reactive: true,
can_focus: true,
x_fill: true,
@sanjarcode
sanjarcode / .gitignore
Last active October 3, 2025 06:27
Computer setup - installing OS, post installation sets - Ubuntu (20.04), or macOS
.vscode
@sanjarcode
sanjarcode / .cursorrules
Last active November 7, 2025 10:55
Dotfiles - Linux, MacOS shell primer files - .bashrc and others
The contents of this repo are placed at ~/.dotfiles.
The idea is to quickly install/uninstall/edit dot files.
It also contains env files (with the actual values being hidden).
@sanjarcode
sanjarcode / how_to_share.md
Last active February 26, 2024 04:12
Browser hacks/tools
@sanjarcode
sanjarcode / .gitconfig
Last active July 14, 2025 16:23
Multiple Git accounts on a device, with SSH keys
# ~/.gitconfig - the global config
[user]
name = Sanjar Afaq
email = [email protected]
[includeIf "gitdir:~/volopay-work/"]
path = ~/volopay-work/.gitconfig
[core]
editor = code --wait
@sanjarcode
sanjarcode / ec2-restart
Last active April 16, 2022 08:08
Setup domain and hosting on server
### EC2 restart
If your server is restarted, its public IPv4 address may change, in that case,
just update the `Route 53` type A record with the new address.
@sanjarcode
sanjarcode / volopay_test.py
Last active December 20, 2022 05:45
Code files
import unittest
class PlaneSeating:
def __init__(self, seat_block_column_n_row, number_of_passsengers):
self.seat_block_column_n_row = seat_block_column_n_row
self.number_of_passsengers = number_of_passsengers
# calculate number of seats of each type
@sanjarcode
sanjarcode / .megasyncignore
Created January 18, 2023 03:58
Personal cloud sync ignore file
# Context for exclusion
# 1. For excluding files, use .gitignore as hint.
# 2. Soft exclusion - Don't copy .gitignore blindly. IDE settings are still.
# .gitignore syntax - MEGAsync exclusion syntax
# 1. /dirName - dirName - directory exclusion
# 2. dir1/dir2 - */dir1/dir2 - MEGAsync is not consistent with exclusion syntax
# Tip - Delete all files to be excluded before settings the exclusion.
# Otherwise the excluded file will have a single stagnant instance in the cloud.
@sanjarcode
sanjarcode / .gitignore
Last active September 30, 2024 06:10
Custom JS for the browser
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json