Skip to content

Instantly share code, notes, and snippets.

View BinarSkugga's full-sized avatar
😂
Laughing lmao

Charles Smith BinarSkugga

😂
Laughing lmao
  • Canada, Québec, Longueuil
View GitHub Profile
@BinarSkugga
BinarSkugga / daemon_thread_pool.py
Created September 3, 2022 05:40
Daemon thread pool that uses daemon threads without the atexit handler
import os
import queue
import time
from concurrent.futures import Future
from queue import Empty
from threading import Event
from typing import Iterable
from kthread import KThread
@BinarSkugga
BinarSkugga / bootstrap.sh
Last active October 4, 2021 16:45
Basic setup for Linux development
#!/bin/bash
# Initial Commands
sudo apt-get update -y 2>&1 | grep -v -E "^W:(.*)$"
sudo apt-get upgrade -y
# Install Utilities
sudo apt-get install -y wget curl gdebi git ca-certificates build-essential apt-transport-https lsb-release
sudo apt-get install -y libssl-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
@BinarSkugga
BinarSkugga / imported.py
Created July 30, 2021 16:54
Providing arguments to a module when importing
import utils
test = utils.inject('test')
foo = utils.inject('foo')
assert test==6
assert foo['value'] == 56
print(__inject__)
@BinarSkugga
BinarSkugga / PowerShellContextAdmin.reg
Created May 23, 2019 01:14
Context menu option to open PowerShell as admin at the location pointed.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Powershell_admin]
@="Open PowerShell Here (Administrator)"
"Icon"="C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\shell\Powershell_admin\command]
@="\"C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe\" -Command \"&{Start-Process C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -ArgumentList '-NoExit -Command &{cd \\\"%1\\\"}' -Verb RunAs}\""
@BinarSkugga
BinarSkugga / RemoveShittyWindowsApps.ps1
Last active September 6, 2020 20:08
Removes unecessary appx packages off of windows 10. Some of them might require to uncheck isInbox in the appx database. NOTE: The description of shitty is subjective, some of these apps might be useful to you.
Get-AppxPackage *WindowsCamera* | Remove-AppxPackage
Get-AppxPackage *OfficeHub* | Remove-AppxPackage
Get-AppxPackage *SkypeApp* | Remove-AppxPackage
Get-AppxPackage *GetStarted* | Remove-AppxPackage
Get-AppxPackage *WindowsMaps* | Remove-AppxPackage
Get-AppxPackage *SolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Zune* | Remove-AppxPackage
Get-AppxPackage *OneNote* | Remove-AppxPackage
Get-AppxPackage *WindowsPhone* | Remove-AppxPackage
Get-AppxPackage *SoundRecorder* | Remove-AppxPackage