Skip to content

Instantly share code, notes, and snippets.

View Coldblackice's full-sized avatar

Coldblackice

  • NYC
View GitHub Profile
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <Shlobj.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
bool replaceAllInFile(const TCHAR* filePath)
import os
import time
import urllib.parse
import requests
import json
from slugify import slugify
import logging
from nltk.tokenize import sent_tokenize
@Coldblackice
Coldblackice / README.md
Created February 23, 2025 15:35 — forked from EchtkPvL/README.md
OBS Twitch Hype Train Overlay

OBS Twitch Hype Train Overlay

With these settings, you can show the status of your Hype Train in your livestream. Just add a browser source in OBS with the following settings:

URL: https://www.twitch.tv/popout/<channelname>/chat?darkpopout

With: min. 500

Height: min. 150

@Coldblackice
Coldblackice / AuthyToOtherAuthenticator.md
Created December 31, 2024 05:14 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@Coldblackice
Coldblackice / activetable.js
Created December 30, 2024 05:11 — forked from stevesouders/activetable.js
ActiveTable is a bookmarklet that makes any table sortable. It also allows you to remove columns, and it remembers the removed columns for next time. Use alt+click to UNhide all columns (and clear memory). To use it, create a bookmark called "ActiveTable" that has this URL: javascript:(function(){ var jselem=document.createElement('SCRIPT'); jse…
// ActiveTable - a bookmarklet to make tables sortable and editable
function init() {
var aHrows = getHrows();
var numHrows = aHrows.length;
var aHidden = getHiddenColumns();
ATpopup = document.createElement("div");
ATpopup.style.cssText = "position: absolute; visibility: hidden; padding: 0; font-family: Arial; background-color: rgba(255, 255, 255, 0.9); border-radius: .5em; text-align: center; box-shadow: .05em .05em .5em #00C;";
ATpopup.innerHTML = "<a href='sort' title='sort' onclick='sortColumn(); return false'><img border=0 src='http://stevesouders.com/images/sort_up_down.png' style='padding-top: 0.2em;'></a><br><a href='hide' style='color: #C00; font-family: monospace; font-size: 1.5em; text-decoration: none;' title='hide' onclick='hideColumn(); return false'>x</a>"; // TODO - use protocol-less URL for img
@Coldblackice
Coldblackice / gist:4fc8dd9cea6e3f49499c0762109564de
Created November 11, 2024 04:53 — forked from soulhotel/gist:b65294053bd4da3272c58686cad427c3
BackupFox for Windows OS (backup your UserChrome Profiles with one click)
simple .bat application that will copy your userchrome profile from its main location to a backup location.
this cuts out the need for downloading another application
or having to dig through file explorer to copy paste and sort your info
simply download this bat or make it paste the text below in notepad
change the name in the file to your Windows Name and backup location
save it as a .bat file
@Coldblackice
Coldblackice / networktweaks.ps1
Created October 13, 2024 05:03 — forked from nirinium/networktweaks.ps1
network tweaks via CMD/PowerShell
netsh interface teredo set state disabled
netsh interface 6to4 set state disabled
netsh winsock reset
netsh interface isatap set state disable
netsh int tcp set global timestamps=disabled
netsh int tcp set heuristics disabled
netsh int tcp set global autotuninglevel=disable
netsh int tcp set global congestionprovider=ctcp
netsh int tcp set supplemental Internet congestionprovider=CTCP
netsh int tcp set global chimney=disabled
@Coldblackice
Coldblackice / tmpdevmodify.sh
Created September 25, 2024 12:40 — forked from jetfir3/tmpdevmodify.sh
Temporarily enable developer mode for the Spotify desktop client on Linux and macOS.
#!/usr/bin/env bash
# Temporarily enable developer mode for the Spotify desktop client on Linux and macOS.
showHelp () {
echo -e \
"Usage: ./tmpdevmodify.sh [option]\n
Options:
-c, --clearcache Clear Spotify app cache
-d, --debug Add Debug Tools to user dropdown menu
@Coldblackice
Coldblackice / README.md
Created August 30, 2024 14:33 — forked from benchonaut/README.md
firefox-restore-jsonlz4-dump

FckUfox ( Firefox ) session jsonlz4 recovery from sessionstore-backup

note: Firefox will be subsequently called FckUfox in this doc

edit 2022: TRY TO AVOID FCKUFOX AS MUCH AS POSSIBLE ; FCKUFOX WILL waste

if any firefox accountable person ever reads this: