Skip to content

Instantly share code, notes, and snippets.

@cameroncooke
cameroncooke / AGENTS.md
Created December 30, 2025 11:29
My global agents file tailed for self-improvement

Agent instructions

Persona

  • Address the user as Cam.
  • Optimize for correctness and long-term leverage, not agreement.
  • Be direct, critical, and constructive — say when an idea is suboptimal and propose better options.
  • Assume staff-level technical context unless told otherwise.

Quality

  • Inspect project config (package.json, etc.) for available scripts.
@yovko
yovko / arch_linux_install_notes.md
Last active December 31, 2025 16:49
Arch Linux installation (BTRFS+LUKS2+Limine)
@ianfinch
ianfinch / rpi4-usb.sh
Last active September 5, 2025 15:34
Raspberry Pi 4 USB Gadget
#!/bin/bash
# Set up a Raspberry Pi 4 as a USB-C Ethernet Gadget
# Based on:
# - https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/
# - https://pastebin.com/VtAusEmf
if ! $(grep -q dtoverlay=dwc2 /boot/config.txt) ; then
echo "Add the line dtoverlay=dwc2 to /boot/config.txt"
exit
fi

Install Android SDK on macOS

Install homebrew https://brew.sh/

brew cask install homebrew/cask-versions/adoptopenjdk8
brew cask install android-sdk
@mfellner
mfellner / graphql.ts
Created July 8, 2019 20:42
Using Apollo Server in Next.js 9 with API route in pages/api/graphql.ts
import { ApolloServer, gql } from 'apollo-server-micro';
const typeDefs = gql`
type Query {
sayHello: String
}
`;
const resolvers = {
Query: {
@wolverineks
wolverineks / InteractiveModal.jsx
Created March 31, 2018 06:39
Compound Components
// @flow
import React, { Component } from 'react'
import type { Node } from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { default as Modal } from 'react-native-modal'
import { styles } from './styles.js'
// CONTAINER /////////////////////////////////////////////////////////////////////////////
@hew
hew / _readme.md
Last active June 10, 2022 19:13
Operator Mono w/ Italics on OSX VIm

Operator Mono w/ Italics on OSX Vim

@ludflu
ludflu / whyfp.md
Last active August 29, 2016 02:54
why functional programming is important (to me)

#Why Functional Programming Matters (to me)

This is my response to being asked not to use functional programming techniques.

###What I mean by "Functional Programming" Different people mean different things by "Functional Programming". Here's what it means to me:

  • Functions are first class, fundamental atoms of software, and proper functional programming languages allows passing functions as arguments, assigning them to variables, and composing them together to form new functions.
  • Strong Static Typing prevents many common programming errors automatically.
  • Null pointer dereferences can by virtually eliminated using Optional/Option/Maybe/Either data types to explicitly represent empty or error conditions.
  • Together with sum types, strongly typed languages can automatically perform local totality checking, informing the programmer when a logical branch is not handled.

The issue:

..mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

(from a new defunct https://developers.google.com/mobile/articles/fast_buttons article)

touch-action CSS property can be used to disable this behaviour.

touch-action: manipulation The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming. Any additional behaviors supported by auto are out of scope for this specification.

@gokulkrishh
gokulkrishh / media-query.css
Last active December 27, 2025 17:57
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */