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 May 3, 2025 02:57
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:
@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 December 10, 2024 16:50
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 May 8, 2025 12:53
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 April 16, 2025 00:45
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 May 12, 2025 10:27
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!

before-after

Nest Hub Max? Come on. I dropped a bunch of devices that were older and/or close to these dimensions. It obviously doesn’t cover everything (sorry Android/Chrome), but offers a decent spread/increments for common 2023/2024 viewports.

@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 {
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
TabView {
InstagramHome().tabItem {
Image(systemName: "house.fill")
}
Text("Instagram").tabItem {