Skip to content

Instantly share code, notes, and snippets.

View ggamel's full-sized avatar
👁️
 👄  👁

Greg Gamel ggamel

👁️
 👄  👁
View GitHub Profile
@zsviczian
zsviczian / Process - Build Book.md
Last active June 12, 2025 07:58
Publishing Workflow: Obsidian, Pandoc, Calibre: EPUB, PDF, TXT

<%* /*

/**
 * Obsidian Templater script to build a book from markdown files.
 * 
 * This script automates the process of generating a publish-ready book from a set of Obsidian markdown files.
 * It is designed to work on both Windows and Mac, and can be run from within Obsidian using the Templater plugin.
 * 
 * The script performs the following steps:
 *   1. Expands all Obsidian embeds and links, recursively flattening the book structure into two markdown files:
@edwhad
edwhad / 1password_ssh_agent_wsl_multiple_github_accts.md
Last active June 24, 2025 23:05
How I configure multiple GitHub accounts using the 1password SSH agent (and working in WSL!)

How I use 1Password to manage SSH keys for multiple GitHub accounts (including on WSL)

If you don't care about why or how this works, you can skip right down to Setup Steps

A little bit of background

These are the considerations I tried to satisfy while researching this solution:

  1. I prefer not to generate new SSH keys for every machine/VM/environment where I use git or SSH. I end up with tons of keys per GitHub account or remote server, and I don't remember which is which.
  2. I want to keep private keys secured somewhere that is not directly accessible on the filesystem. Also try to avoid copying private keys around at all costs.
@faustinoaq
faustinoaq / myAngular.html
Last active May 6, 2025 15:35
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
@lzilioli
lzilioli / README.md
Last active April 8, 2025 23:17
typingmind extension for exporting chats to a zip file

TypingMind Extension - Export Chats

Exports chat history from the typingmind application.

Changelog

2025-03-23

  • cleaned up visual styling for the buttons to match the typingmind sidebar
@searls
searls / extension_murderer_controller.js
Last active June 17, 2025 16:40
There's no way for web developers to prevent 1Password from thinking it can fill one-time-passwords (OTP) if they have autocomplete=one-time-code. This is madness, because 80% of these are SMS/email, and 1Password offers no way to fill these.
import { Controller } from '@hotwired/stimulus'
const BANNED_NODES = ['com-1password-button', 'com-1password-menu']
export default class extends Controller {
connect () {
this.observer = new window.MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if (BANNED_NODES.includes(node.nodeName.toLowerCase())) {
node.remove()
@velzie
velzie / manifest-v2-chrome.md
Last active June 16, 2025 23:57
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@realvjy
realvjy / ChoasLinesShader.metal
Last active June 23, 2025 08:12
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@mfehrenbach
mfehrenbach / chrome-device-dimensions.md
Last active June 30, 2025 09:50
Modern device dimensions for Chrome DevTools.

Modern Device Dimensions for Chrome DevTools

These are modern “Emulated Devices” (a.k.a. responsive dimensions) for Chrome DevTools’ Mobile Device Viewport Mode.

They are specifically Apple devices, subtracting for recent Safari UI (as in window.innerWidth/Height), and cleverly sorted with some dark-arts unicode shenanigans. (This glitchy, unloved portion of the tools sorts lexicographically, because of course it would.) Ergonomics!

 

Note

Updated June 2025 with some notes from folks below! TL;DR: use Vibranium!

@wb-softwares
wb-softwares / tinder.swift
Last active April 15, 2024 13:53
Recreating the Tinder home screen using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
@State var size: CGSize = .zero
var body: some View {
//Lets Start with our Tinder Home Screen Recreate
//First, we need entire background to be gray-ish color. ZStack puts different views on top of each other.
ZStack {