Skip to content

Instantly share code, notes, and snippets.

@BlazerYoo
BlazerYoo / path.bat
Created June 15, 2021 21:33
Append (add to end) to path
set PATH=%PATH%;C:\your\path\here\
@BlazerYoo
BlazerYoo / cli.bat
Created June 15, 2021 21:00
Get command line arguments in bash, batch, and powershell scripts
@echo off
echo %*

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@BlazerYoo
BlazerYoo / index.js
Last active June 17, 2021 23:40
ExpressJs static file server
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
app.use(express.static(path.join(__dirname + '/files')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname + '/files/index.html'));
@BlazerYoo
BlazerYoo / rename_PNG.py
Last active May 14, 2021 10:12
Rename '.PNG' files made from Snipping Tool to '.png'
import os
for f in os.listdir():
if f.endswith('.PNG'):
os.rename(f,os.path.splitext(f)[0]+'.png')
@BlazerYoo
BlazerYoo / count_files.sh
Last active June 28, 2021 02:32
Terminal print number of files in current directory
python -c "import os;print(len(os.listdir(os.getcwd())))"
@BlazerYoo
BlazerYoo / README.md
Created May 7, 2021 07:51 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATED 3.12.2020

The old version of youtube with "disable_polymer" is not working anymore, so the script also stopped working.

Thanks to JanTheDeveloper we have a new working script. Big up!

I just changed the '//span[contains(text(),"Watch later")]', to '//span[contains(text(),"Remove from")]', and it should work for any playlist, not just the watch later one. (thanks to hudsonite for the tip)

setInterval(function () {
 document.querySelector('#primary button[aria-label="Action menu"]').click();
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.