Skip to content

Instantly share code, notes, and snippets.

@gamesguru
gamesguru / sol.py
Created January 15, 2021 18:19
Python printing: family-tree
class Node:
def __init__(self, parent_id, id, name):
self.id = id
self.parent_id = parent_id
self.name = name
self.children = []
def printChildren(node, level=1):
for c in node.children:
.headers on
.mode column
PRAGMA foreign_keys = 1;
@gamesguru
gamesguru / startup-shortcuts.sh
Last active March 17, 2022 18:14
xinput configurations for home desktop setup
#!/bin/bash
# # compx Left Hand
# xinput set-prop "pointer:Compx 2.4G Receiver Mouse" 322 1
# logitech Left Hand
xinput set-prop "Logitech USB Trackball" 328 1
# logitech Scroll Enabled
xinput set-prop "Logitech USB Trackball" 317 0 0 1
# logitech Scroll Button
@gamesguru
gamesguru / my-ublock-static-filters.txt
Created September 20, 2020 16:50
uBlock filter list (importable)
! 2020-09-20 https://www.facebook.com
facebook.com#?#div[id^=hyperfeed_story_id_]:has(a[role^=button]:has(> span:has-text(S)):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(span:has-text(9)):not(span:has-text(w)))
@gamesguru
gamesguru / onboard.sh
Last active July 5, 2022 19:00
Onboard Linux clients according to desired standards
#!/bin/bash
# Clock setttings
gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.desktop.interface clock-show-weekday true
gsettings set org.gnome.desktop.interface clock-show-seconds true
gsettings set org.gnome.desktop.interface clock-format '12h'
# Click action on menu icons in dock bar
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize-or-previews'
@gamesguru
gamesguru / cpu_info.py
Created September 8, 2020 17:53
Gets CPU/MoBo/HDD info on Linux
#!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 11 13:55:12 2018
@author: shane
"""
import os, sys
import subprocess
[
{
"vendor":0,
"path":[
[
-97.743,
30.284
],
[
-97.743,
[
{
"vendor":0,
"path":[
[
-97.743,
30.284
],
[
-97.743,
[
{
"vendor":0,
"path":[
[
-97.743,
30.284
],
[
-97.743,
[{"vendor":"0","path":[[-80.1872466,25.7711021],[-80.1872027,25.7712436],[-80.1872349,25.7718766],[-80.1871812,25.7725954],[-80.1870847,25.7728314],[-80.1869237,25.7727778],[-80.1865804,25.7727134],[-80.18525,25.7727349],[-80.1851535,25.7727671],[-80.1850891,25.7728314],[-80.1851642,25.7728636],[-80.1857865,25.7728422]],"timestamps":[46.5,46.59090909090909,46.68181818181818,46.77272727272727,46.86363636363637,46.95454545454545,47.04545454545455,47.13636363636363,47.22727272727273,47.31818181818182,47.40909090909091,47.5]}, {"vendor":"0","path":[[-80.1939079,25.7625476],[-80.1931465,25.7625747],[-80.1932001,25.763154],[-80.1932169,25.7636912]],"timestamps":[24.5,24.5,24.5,24.5]}, {"vendor":"0","path":[[-80.2543652,25.7442284],[-80.2542901,25.7429838],[-80.2518117,25.7430375],[-80.2498269,25.7431126],[-80.2498071,25.7425632]],"timestamps":[18.5,18.75,19,19.25,19.5]}, {"vendor":"0","path":[[-80.2449782,25.7250933],[-80.2451813,25.7248199],[-80.2456748,25.7243049],[-80.2458572,25.7240903],[-80.2478421,25.7219982]