Skip to content

Instantly share code, notes, and snippets.

View ThatOneCalculator's full-sized avatar
🌊
Vibing

Kainoa Kanter ThatOneCalculator

🌊
Vibing
View GitHub Profile
@kepler-5
kepler-5 / comp_multi.rs
Created January 6, 2025 19:04
Python comprehension proc macro that handles multiple nested for-if-clauses, flattening nested structure
// Python comprehension proc macro that handles multiple nested for-if-clauses, flattening nested structure.
// Example:
//
// let vec_of_vecs = vec![vec![1, 2, 3], vec![4, 5, 6]];
//
// let result = comp![x for vec in vec_of_vecs for x in vec].collect::<Vec<_>>();
// assert_eq!(result, [1, 2, 3, 4, 5, 6]);
//
use proc_macro2::TokenStream as TokenStream2;
<svg width="300" height="300" viewBox="0 0 300 300">
<defs>
<filter id="paperEffect">
<feTurbulence
type="fractalNoise"
baseFrequency="0.04"
numOctaves="5"
result="noise"
/>
<feDiffuseLighting
@ThatOneCalculator
ThatOneCalculator / import_ggufs.sh
Created January 7, 2024 22:48
A dead simple batch gguf importing script. Just place/run it in the same directory as your ggufs.
#!/usr/bin/env bash
for gguf_file in ./*.gguf; do
base_name=$(basename "$gguf_file" .gguf)
echo "Making modelfile for $base_name"
model_file="./Modelfile_$base_name"
echo "FROM ./$gguf_file" > "$model_file"
ollama create "$base_name" -f "$model_file"
rm "$gguf_file"
rm "$model_file"
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active February 17, 2025 07:33
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@evenevan
evenevan / nfc-contact.md
Created August 25, 2023 20:36
Share your contact information in a fun way with a NFC tag. Compatible with both Android and iOS.

Introduction

Share your contact information in a fun way with a NFC tag.

Compatibility

The resulting NFC tag is compatible with both iOS and Android, see the notes for additional information.

Guide

This process will probably take you about 5-10m to create a vCard, about 5-10m to host your .vcf file, and 5m to write the vCard to your NFC tag.

Prerequisites

@bagder
bagder / curl-in-two-hours-agenda.md
Last active February 17, 2024 12:08
Master curl in two hours. A video course by Daniel

The idea is to make a two and a half hour (give or take) video course explaining and detailing curl, the command line tool. How it works, how to use it, from the basics to some more advanced uses. This will be done by Daniel Stenberg, founder and lead developer of the curl project.

The recording and live-stream is scheduled for August 31, 2023. In the US morning and Euro evening.

See blog post for details.

The project (10 min)

@vimfn
vimfn / screensht
Created April 13, 2023 08:01
Screenshot go brrrr
#!/bin/bash
set -o pipefail
# Directory
_SCREENSHOT_DIR_=$HOME/Pictures/Screenshots
_ORIGINAL_DIR_=$_SCREENSHOT_DIR_/Original
_LOG_FILE_="$_SCREENSHOT_DIR_/.screensht.log"
# Color
_FG_COLOR_='#cdd6f4'
@soygul
soygul / youtube-upload.js
Last active October 16, 2024 18:16
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs
//
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');
@sawaYch
sawaYch / Determination.txt
Last active January 15, 2024 10:46
+ You are filled with Determination +
┏━━━━━━━━━━━━━━┓
┃ ┃
┃ ❤️ |
| |
┗━━━━━━━━━━━━━━┛
@aqua-lzma
aqua-lzma / owoify.js
Last active January 2, 2023 18:36
OwO'ify discowd hehe makes it vewy funny :3 (Check comments for usage)
(function () {
// OwO whats this vewsion 6.9.?c ~ :3
// I h-hope you l-like it...
let stutterChance = 0.1
let prefixChance = 0.05
let suffixChance = 0.15
let words = {
love: 'wuv',
mr: 'mistuh',