Skip to content

Instantly share code, notes, and snippets.

View nhalstead's full-sized avatar
👨‍💻
Something. Maybe cool

Noah Halstead nhalstead

👨‍💻
Something. Maybe cool
View GitHub Profile
@nhalstead
nhalstead / anonymous_google_profile_images.md
Created September 6, 2023 19:05 — forked from hmnd/anonymous_google_profile_images.md
Definitive list of anonymous Google Profile Images
import asyncio
from asyncio import gather
async def long_process(ith: int):
print(f"foo {ith}")
await asyncio.sleep(2)
print(f"bar {ith}")
return f"result {ith}"
from http.server import BaseHTTPRequestHandler, HTTPServer
class MyHTTPRequestHandler(BaseHTTPRequestHandler):
def _set_response(self, content_type='text/plain'):
self.send_response(200)
self.send_header('Content-type', content_type)
self.end_headers()
def do_GET(self):
self._set_response()
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
html {
@nhalstead
nhalstead / ConfirmByPassword.php
Created March 12, 2022 04:39 — forked from DarkGhostHunter/ConfirmByPassword.php
Confirms an action with a password
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Lang;
@nhalstead
nhalstead / dedup.php
Last active June 19, 2021 21:08
Used to cleanup duplicate files. (by filename local to the folder)
#!/usr/bin/php
<?php
/**
* 1. Find all files that have the common symbols for copied files " (1)."
* 2. Sort list by the largest file size
* 3. Delete all other matches (and original filename without the number indication)
* 4. Rename the largest to match the original name
*
* This program uses a TXT to read in the index of files.
[
{
"currency": "Albania Lek",
"abbreviation": "ALL",
"symbol": "&#76;&#101;&#107;"
},
{
"currency": "Afghanistan Afghani",
"abbreviation": "AFN",
"symbol": "&#1547;"
@nhalstead
nhalstead / README.md
Created December 1, 2020 16:38 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATE 17.10.2019

Only works on old youtube skin.

//added "&disable_polymer=true" after playlist link

Also, saw this now, there is a "remove watched" button.

  1. Open your watch later playlist on youtube.
  2. Open the development console for your browser ( Ctrl+Shift+J for chrome, Ctrl+Shift+K for firefox )
@nhalstead
nhalstead / disable.txt
Last active November 3, 2020 18:28
MacOS disable Apple Music (iTunes) from opening when pressing Pause Play Keys
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
@nhalstead
nhalstead / abreavtion.js
Last active November 12, 2020 20:46
Javascript Number Abreavtion
/**
* Parse an aberration of a number
*
* @author Noah Halstead <nhalstead00@gmail.com>
* @param {string} value Abbreviated Number
* @return {number} amount
*/
function unabbreviateNumber(value = "") {
value = value.toLowerCase().replace(/,/g, "")