Skip to content

Instantly share code, notes, and snippets.

View Coldblackice's full-sized avatar

Coldblackice

  • NYC
View GitHub Profile
@Coldblackice
Coldblackice / SearchEverything.ahk
Created February 10, 2017 03:00 — forked from Onurtag/ExploreEverything.ahk
Search current folder using Everything
#NoTrayIcon
#SingleInstance Force
MyUsername := "Onurtag" ;Go to your %userprofile% and change this to the title of that window. Keep the quotes.
MyRecycleBin := "Recycle Bin" ;Go to your Recycle Bin and change this to the title of that window. Keep the quotes.
MyThisPC := "This PC" ;Go to your This PC and change this to the title of that window. Keep the quotes.
;You can delete below blocks if you don't want the features.
;BLOCK 1 - DESKTOP
@Coldblackice
Coldblackice / export-from-stylish.py
Created November 14, 2020 02:40 — forked from ExE-Boss/export-from-stylish.py
Export styles from Stylish for Firefox
#! /usr/bin/env python3
import os.path
import glob
import sqlite3
import json
def main():
styles_glob = os.path.expanduser('~/AppData/Roaming/Mozilla/Firefox/Profiles/*.default/stylish.sqlite');
styles_path = glob.glob(styles_glob)[0];
@Coldblackice
Coldblackice / MozLZ4-garbage.md
Created September 15, 2022 12:27 — forked from ATRescue/MozLZ4-garbage.md
MozLZ4/JsonLZ4 is a moronic idea. Here's why.

MozLZ4/JsonLZ4 is a moronic idea. Here's why.

Written by ATrescue.

I am not implying the comperssion algorithm Lz4 is bad. But adding an Lz4 layer to JSON files was a terrible idea by Mozilla.

Since Firefox version 56 (which is the last non-quantum version of Firefox), the session files in the 📁 sessionstore-backups directory are no longer recovery.bak and recovery.json, but recovery.baklz4 and recovery.jsonlz4. They should have called it recovery.bak.lz4 and recovery.json.lz4, which would be more logical file names, but they should not have done it in first place. Also the folders 📁bookmarkbackups 📁crashes/store.json.mozlz4 📁datareporting is affected (intoxicated) by Lƶ4.

“If it isn't broken, don't ‘fix’ it” does not apply to everything (e.g. when improving so

@Coldblackice
Coldblackice / Start-WindowsCleanup.ps1
Created October 3, 2022 15:16 — forked from Ioan-Popovici/Start-WindowsCleanup.ps1
Performs a windows cleanup by removing volume caches, update backups, update and CCM caches.
<#
.SYNOPSIS
Performs a windows cleanup.
.DESCRIPTION
Performs a windows cleanup by removing volume caches, update backups, update and CCM caches.
.PARAMETER CleanupOptions
Supported options:
"comCacheRepair" # Component Cache Repair
"comCacheCleanup" # Component Cache Cleanup
"volCacheCleanup" # Volume Cache Cleanup
@Coldblackice
Coldblackice / Start-WindowsCleanup.ps1
Created October 3, 2022 15:21 — forked from DrEmpiricism/Start-WindowsCleanup.ps1
Clean-up system clutter and reclaim disk space
Function Start-WindowsCleanup
{
<#
.SYNOPSIS
`Start-WindowsCleanup` cleans-up a system clutter and reclaims disk space.
.DESCRIPTION
The `Start-WindowsCleanup` cmdlet performs the following clean-up tasks to reclaim disk space:
Clears the contents of common directories of the Windows file system for both the current running user and the global system that are used to store temporary, logging, backup, cache and dump files.
REM you need to execute in adminstrator command prompt
REM based on
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder
Dism.exe /online /Cleanup-Image /StartComponentCleanup
REM All existing service packs and updates cannot be uninstalled after this command is completed.
REM This will not block the uninstallation of future service packs or updates
Dism.exe /online /Cleanup-Image /SPSuperseded
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
# Created by @PhilippIRL
# This script patches Spotify's offline.bnk file (this file caches the remote config) to trick Spotify into thinking that your account is enabled for dev tools.
# Spotify will automatically revert this local change after some time when it next fetches the remote config.
# Of course you will have to completely close Spotify before running this script.
import os, sys, platform
systemPlatform = platform.system()
if systemPlatform == 'Windows':
@Coldblackice
Coldblackice / twitch-recorder.py
Created March 31, 2023 10:17 — forked from junian/twitch-recorder.py
Record Twitch Streams Automatically in Python
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
import requests
import os
import time
import json
import sys
import subprocess
javascript:(function(){
//inspired by http://userscripts.org/scripts/show/8924
var s = document.createElement('script');
s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');
if(typeof jQuery=='undefined') document.getElementsByTagName('head')[0].appendChild(s);
(function() {
if(typeof jQuery=='undefined') setTimeout(arguments.callee, 100)
else{
jQuery("*").one("click",function(event){
//http://snippets.dzone.com/posts/show/4349