Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jameshi16's full-sized avatar
💻
imagine programming omegalul

jameshi16 jameshi16

💻
imagine programming omegalul
View GitHub Profile
@jameshi16
jameshi16 / README.md
Last active October 9, 2023 07:47
[Mine] Script to download all the things from "Public Static Void"

Pre-requisites

You will need FFMPEG installed and available in your path.

Run pip install -r requirements.txt, then run python3 main.py.

Outputs

In out/, you'll get:

@jameshi16
jameshi16 / SSH_Introducing_Scripts.md
Last active August 7, 2022 01:44
[Mine] Easily introduce new machines to ~/..ssh/authorized_keys

SSH Introducing Scripts

I find it a huge pain to introduce new machines as authorized hosts when linking them up to my existing servers. While enterprise-level systems exists for sysadmins to manage thousands of SSH Keys, I am but a simple man with his hoard of servers.

Hence, I created these scripts to alleviate the pain & hassle of adding a new hosts to my servers.

Features

  • Simple UI to upload keys
  • Random URL generated for key upload all the time
@jameshi16
jameshi16 / Buttons.gs
Created January 25, 2022 04:30
[Mine] Duty Planning on Google Sheets with LP
/**
* Ensures that the dates are laid out in the grid correctly.
*/
function setup() {
SpreadsheetApp.getActive().toast("Setting up...");
const days = Math.floor((highestDate - lowestDate) / (1000 * 60 * 60 * 24));
for (var i = 1; i < days + 2; i++) {
daysRange.getCell(1, i).setValue(i);
}
@jameshi16
jameshi16 / Dockerfile
Last active July 11, 2022 12:28
[Mine] Supporting Gists for Signal bot blogpost
FROM ubuntu:latest
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y python3 python3-pip openjdk-18-jre coreutils curl wget libcairo2-dev libgirepository1.0-dev
WORKDIR /tmp
RUN curl -s https://api.github.com/repos/AsamK/signal-cli/releases/latest \
| grep "browser_download_url.*Linux.tar.gz\"$" \
| cut -d : -f 2,3 \
| tr -d \" \
| grep ".gz$" \
| wget -qi -
@jameshi16
jameshi16 / InterviewerAnswer.cpp
Created June 18, 2019 13:54
[Mine] Binary Tree Traversal
#include <iostream>
//==RELATED TO INTERVIEW==
//Q: Return next element (if 9, return 11), -2 if next element doesn't exist, -1 if element itself doesn't exist
struct Node {
Node *left = nullptr;
Node *parent = nullptr;
Node *right = nullptr;
int value = 0;
};
@jameshi16
jameshi16 / fuggit.py
Created March 19, 2019 16:00
[Mine-ish] Fuggit v1
import traceback
import os
while True:
try:
import app
break
except BaseException as e:
stack_summary = traceback.extract_tb(e.__traceback__)
frame_summary = stack_summary.pop()
@jameshi16
jameshi16 / README.md
Last active November 17, 2018 08:04
[Mine-ish] VLC & YouTube - Play all 100 videos on your playlists

What

The below is a LUA script that can pull out at most 100 videos from a playlist URL, and add it to your VLC playist. It's basically a clone of the youtube.lua script linked within the youtube-playlists.lua file, but with all the frills removed, because I still want an updated copy of youtube.lua from the official VideoLAN team.

I can't play some videos!

If you're using VLC <=3.0.4, you'd probably not be able to play some videos, especially those from VIVO or otherwise. To fix this, put this youtube.lua script into the same directory as you would for youtube-playlists.lua. This should allow you to watch those videos now.

Reference