Skip to content

Instantly share code, notes, and snippets.

@Atrate
Atrate / hyprtabs.sh
Last active May 18, 2024 11:47
i3-like tabs for Hyprland. Usage: save the script as `~/.config/hypr/hyprtabs.sh` or somewhere else and add the following to your `hyprland.conf`, changing the keybind or path as you see fit: `bind = $mainMod SHIFT, w, exec, ~/.config/hypr/hyprtabs.sh`
#!/bin/bash --posix
# ------------------------------------------------------------------------------
# Copyright (C) 2024 Atrate
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
@Atrate
Atrate / snowstats.sh
Last active April 2, 2024 19:02
Quick script to get the statistics of traffic on Tor Project's Snowflake proxy instance running locally on docker
#!/bin/bash --posix
docker logs snowflake-proxy 2>&1 | grep --color=auto 'Traffic Relayed' | awk '
{
# Extract the download and upload values
down[1] = $14
down[2] = $15
gsub(/[^a-zA-Z]/, "", down[2])
up[1] = $17
up[2] = $18
@keathmilligan
keathmilligan / msgraph-upload-session.py
Created March 23, 2020 17:01
Upload a large file using an upload session to a SharePoint site using MS Graph and MSAL
import requests
import msal
import atexit
import os.path
import urllib.parse
import os
TENANT_ID = '<your tenant id>'
CLIENT_ID = '<your application id>'
@MuntashirAkon
MuntashirAkon / ebooksites.txt
Created July 9, 2019 14:31
Deceptive Ebook Sites (Can be used with Adblock)
||playperks.net
||allbookserve.org
||bookfreenow.com
||pdfsu.online
||akeybooks.com
||outofprint.cc
||get-ebooks.club
||mybooklibrary.com
||iread-now.com
||recmedia.me
@msfjarvis
msfjarvis / sepolicy.md
Last active December 16, 2023 20:50
How to write sepolicy to fix a denial
@elucidater
elucidater / Binding of Isaac - Original Source Code
Last active May 11, 2024 21:34
Binding of Isaac - Original Source Code
movie 'isaac.swf' {
// flash 8, total frames: 41, frame rate: 30 fps, 800x600 px, compressed
movieClip 338 {
}
movieClip 339 b501 {
}
movieClip 342 {
@QuantumCD
QuantumCD / Qt 5 Dark Fusion Palette
Created August 15, 2013 21:40
This is a complete (I think) dark color palette for the Qt 5 Fusion theme, as well as a nice style sheet for the tool tips that make them blend better with the rest of the theme. To have immediate effect, be sure to put this in your main function before showing the parent window. Child windows should automatically inherit the palette unless you …
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25,25,25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);
@aras-p
aras-p / preprocessor_fun.h
Last active May 18, 2024 08:55
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no