Skip to content

Instantly share code, notes, and snippets.

View ctsrc's full-sized avatar
🦈

codetrotter ctsrc

🦈
View GitHub Profile
@egeozcan
egeozcan / index.html
Created October 18, 2024 08:40
image viewer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fullscreen Image Viewer</title>
<style>
body {
font-family: Arial, sans-serif;
}
@rain-1
rain-1 / organize images using AI.md
Last active October 11, 2024 13:24
organize images using AI

Organize Images into folders using AI

This is a tool that sorts images into folders using "AI". You create the folders you want the images to be put into.

I got 'claude' to write with a couple prompts. Make venv and install deps with pip.

@sqwxl
sqwxl / git.fish
Last active October 12, 2024 15:55
Never again accidentally run `commit --amend` instead of `rebase --continue` in a merge conflict
function git
if test $argv[1] = commit; and contains -- --amend $argv
git_commit_safe_amend $argv[2..-1]
else
command git $argv
end
end
@xpl
xpl / hackernews-chat-mode.userscript.js
Last active October 12, 2024 15:55
HackerNews Chat Mode (Live Comments Updater)
// ==UserScript==
// @name HN Chat Mode
// @namespace https://news.ycombinator.com/
// @version 2024-09-18
// @description live comments updater
// @author You
// @match https://news.ycombinator.com/item*
// @icon https://www.google.com/s2/favicons?sz=64&domain=news.ycombinator.com
// @grant none
// ==/UserScript==
@niekvandepas
niekvandepas / spotify-saved-albums.py
Last active October 12, 2024 15:55
Create a playlist from all your saved Spotify albums, so you can shuffle your entire library
#!/usr/bin/env python
import spotipy
from spotipy.oauth2 import SpotifyOAuth
# INSTRUCTIONS:
# Go to https://developer.spotify.com/dashboard, create an app,
# and paste the Client ID and Client Secret below.
# Also make sure to add a random localhost callback URL to 'redirect URLs' in the dashboard, e.g., "http://localhost:8888/callback" as used below.
sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
@sebastiankade
sebastiankade / modern-id-spec.md
Last active October 12, 2024 15:42
Stop using UUIDs: The Modern ID Spec

Modern ID Spec

An adaptable, human-friendly, web-safe, unique ID spec for modern applications.

Guiding Principles

  • Short
  • Human friendly
  • URL-safe
  • Developer experience
@shraiwi
shraiwi / readme.md
Created August 14, 2024 20:45
SiMin

SiMin

A lightweight format for writing numbers using scientific notation.

I wrote this to make it easy to allow applications to accept values with units gracefully. Although many languages implement scientific notation, I never found it as ergonomic as just using SI prefixes. Would you rather a user input a unitless 1.024e+6 or 1_000KiB?

How does it work?

A SiMin number has three parts: a value, prefix, and unit. Let's look at an example:

tokenize('-120mT') === [ '-120', 'm', 'T' ]
@rehhouari
rehhouari / system-wide-clipboard-linux.zsh
Last active December 21, 2024 17:12 — forked from varenc/system-wide-clipboard.zsh
Zsh copy & paste system wide for Linux (X11& Wayland with customizable paste and copy commands)
# Forked from https://gist.github.com/varenc/e4a22145c484771f254fa20982e2cd7f
## 2024-08-26: Update wayland detection method to work in Zellij and over SSH.
## 2024-03-30: Ported it to Linux, added display detection and customizable copy/paste commands
## Using environment variables
## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo
## and so that CUTBUFFER shows up exactly in the pasteboard without modification
## If running on Wayland, use wl-clipboard
@AndrewKvalheim
AndrewKvalheim / README.md
Last active August 31, 2023 19:08
en_US@aspirational