Skip to content

Instantly share code, notes, and snippets.

View dai's full-sized avatar
🗻
still Catch it Up.

dai dai

🗻
still Catch it Up.
View GitHub Profile
@uptownhr
uptownhr / gist:888f27fcf4d636d0197dd5736514094a
Last active July 5, 2024 04:35
One Million Checkboxes - Checker
// to copy and paste in your browser console after successfully loading https://onemillioncheckboxes.com/
let currentPosition = 459999
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
@jessitron
jessitron / self-updating-version.sh
Created June 16, 2024 20:16
updating the version number after the deploy, by editing the deploy script
#!/bin/sh
# do something with a version number, and then increment the version number in this script.
# Is this a good idea? No claims made.
set -e # exit on fail
set -x # print what you're doing
me=$0 # name of this script
@guest271314
guest271314 / harmony.md
Last active July 8, 2024 09:13
Why I use node, deno, bun, qjs, tjs at the same time

Why I use node, deno, bun, qjs, tjs at the same time.

Winds up being a (not the) rather comprehensive JavaScript toolbox. The idea being for the modern JavaScript programmer can use all of the tools available for a given requirement, task or job, without preference for any. No external bundlers or compilers are needed. No frameworks are needed. I can use qjs or tjs for systems with minimal RAM and disk space; and when I want to use Web API's deno makes an effort to provide those interfaces. In some cases I can run the exact same code in bun, deno, and node, which provides a means to perform 1:1 testing as to performance.

There's probably a few things I am unintentionally omitting below. These are just a brief synposis. I'll update accordingly.

@bpiroman
bpiroman / boootstrap-buttons.css
Created March 30, 2024 04:07
bootstrap buttons CSS ;)
:root {
--primary: 211, 100%;
--primary-l: 50%;
--secondary: 208, 7%;
--secondary-l: 46%;
--success: 134, 61%;
--success-l: 41%;
--info: 188, 78%;
--info-l: 41%;
--warning: 45, 100%;
@ceving
ceving / Web Component for Copyright Years.md
Last active May 27, 2024 22:58
Web Component for Copyright Years
@dhh
dhh / linux-setup.sh
Last active July 19, 2024 07:52
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@ryogrid
ryogrid / nostrp2p_demo_v3_procedure.md
Last active June 9, 2024 01:35
About trial procedure of NostrP2P

Trying to enable (some) Nostr clients to connect to the NostrP2P server

  • The I/F for NostrP2P clients is REST, but it is necessary to insert a WS <-> REST bridge server for Nostr called Yonle/nhttp-adapter So, I tried to make it behave in a way that is compatible to some extent
    • Some modifications were required to the NostrP2P server to achieve this...
    • The specifications of nhttp -adapter were not compatible with NostrP2P's REST I/F, so I made some modifications ryogrid/nhttp-adapter

How to try

  • Client to use
    • For now, I will use Snort because it seems to handle the display of posts and profile information well even if I respond to REQ in a careless manner
  • procedure
@Olwiba
Olwiba / Microsoft.Powershell_profile.ps1
Last active March 5, 2024 02:28
Get-Json Property - Powershell ⚡
# catjp - Concatenate JSON property
# Made with 💖 - Olwiba
function Get-JsonProperty {
param (
[Parameter(Mandatory=$true)]
[string]$Path,
[Parameter(Mandatory=$true)]
[string]$Property
@pirate
pirate / music_in_screenshots.py
Created January 12, 2024 14:43
Automatically detect song/video title/artist/album/metadata captured in screenshots using GPT-4-vision via the OpenAI API.
#!/usr/bin/env python3
# Script to extract song/video title, artist, album, etc. metadata from screenshots w/ GPT-4.
### Example Usage: ###############################################################################
#
# ➜ ~/Desktop # python3 music_in_screnshots.py --prompt=prompt.txt --attach=spotify_screenshot.PNG
# {
# "found_prominent_media": true,
# "all_strings": [
@mitchellh
mitchellh / archive.md
Last active July 22, 2024 21:52
Archive List

Planned Repo Archive

In the new year, I plan on archiving the repositories below. Because I plan on only archiving the repositories, any project that depends on any of these projects will continue to work. However, I will no longer be accepting issues or pull requests and will never tag a new release.

The reality of each of the projects listed below is that I've almost completely ignored issues and pull requests for