Skip to content

Instantly share code, notes, and snippets.

@mostlygeek
mostlygeek / demo.tsx
Created June 11, 2025 00:25
keyboard avoiding view for ios, react-native, that actually kinda works as expected.
import { KeyboardAvoidingView, TextInput, StyleSheet, View } from "react-native";
import Animated, { useAnimatedKeyboard, useAnimatedStyle } from "react-native-reanimated";
import { Text } from "@/themes";
import { useState } from "react";
export default function Screen() {
const [content, setContent] = useState(() => {
return Array.from({ length: 100 }, (_, i) => `Line ${i + 1}`).join("\n");
});
const keyboard = useAnimatedKeyboard();

Prompt

List all the reasons why supporting a child with a learning disability (or any sort of extra support needs) is so complicated.

Combined Summary

Here is the combined list of reasons why supporting a child with a learning disability or extra support needs is complicated:

  1. Individualized Needs: Each child has unique needs and strengths, requiring tailored strategies.
  2. Diagnostic Challenges: Accurate diagnosis can be difficult, and symptoms may overlap with other conditions.
@mostlygeek
mostlygeek / gist:da429769796ac8a111142e75660820f1
Last active December 2, 2024 19:42
testing llama-swap settings for performance
#
# Run "write sname game in $lang" with different llama-swap profiles and llama.cpp
# greps logs for latest `eval time`
#
for model in "qwen-coder-32b-q4-nodraft" "qwen-coder-32b-q4" "qwen-coder-32b-q4-w-ctk"; do
for lang in "python" "typescript" "swift"; do
echo "Generating Snake Game in $lang using $model"
curl -s --url http://localhost:8080/v1/chat/completions -d "{\"messages\": [{\"role\": \"system\", \"content\": \"you only write code.\"}, {\"role\": \"user\", \"content\": \"write snake game in $lang\"}], \"temperature\": 0.1, \"top_k\": 1, \"model\":\"$model\"}" > /dev/null
curl -s --url http://localhost:8080/logs | grep 'eval time' | tail -n 2
Find 8 broad categories across the list of struggles faced by parents and caregivers of children with ADHD and or autism. Include a description for each category.
Each category should be in this format:
## Category Name
Short description of the struggles faced by parents and caregivers
List of Struggles:
- reel layout
- payline layouts
-
# lives with the python code:
/game_data/
/slots
shrek.json
@mostlygeek
mostlygeek / Makefile
Created October 12, 2023 22:23
Makefile for extract BC special needs data
#
# Statistics from data.gov.bc.ca for students with diverse needs
#
# - downloads the csv file
# - uses csvkit to create the extracted data files
#
INPUT = source.csv
OUTPUT_DIR = output
@mostlygeek
mostlygeek / main.go
Created March 20, 2023 18:54
golang SSE example generated GPT4
package main
/*
This was entirely generated by GPT4 with the prompt:
write me a simple golang server demonstrating server sent events (sse)
*/
import (
@mostlygeek
mostlygeek / gist:664bb0b4616c5f084f3dd9470536d0e3
Created January 13, 2022 20:03
All the monitor.{type} output in taskcluster
$ cd taskcluster
$ grep -ornE "monitor\.(emerg|alert|crit|err|warning|notice|info|debug)\(" services | awk -F ':' '{printf "%s:%s %s\n",$1,$2,$3}' | column -t | pbcopy
services/built-in-workers/src/TaskQueue.js:24 monitor.debug(
services/built-in-workers/src/TaskQueue.js:28 monitor.debug(
services/built-in-workers/src/TaskQueue.js:40 monitor.debug(
services/github/src/github-auth.js:26 monitor.debug(
services/github/src/github-auth.js:27 monitor.info(
services/github/src/github-auth.js:28 monitor.warning(
services/github/src/github-auth.js:29 monitor.err(
@mostlygeek
mostlygeek / cooler-bot.ino
Created January 2, 2022 23:51
Code for a little robot that open/closes a door in my AV console when it gets too hot inside.
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
// *** -= WIFI & Web =- **************************************
ESP8266WebServer server(80); // listen on port 80
// ***********************************************************
@mostlygeek
mostlygeek / .profile
Created August 14, 2021 17:02 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else