Skip to content

Instantly share code, notes, and snippets.

View dai's full-sized avatar
:octocat:
still Catch it Up.

dai dai

:octocat:
still Catch it Up.
View GitHub Profile

A Journey Though Elixir's Syntax

This was written in response to this Reddit post. Which asked:

defmodule User do
  @enforce_keys [:name]
  defstruct [:name, age: 0, email: nil]
end
@awestley
awestley / speed.py
Last active April 8, 2025 17:06
speed.py
import ollama
import time
import re
from transformers import AutoTokenizer
MODEL = "r1-1776-500:671b"
QUESTIONS = [
"Explain how a rocket engine works in simple terms.",
"Can you tell me how fuel combustion happens inside the engine?",
@attilatorda
attilatorda / Add_Explorer_Context_Menus.bat
Created April 3, 2025 22:48
Windows Explorer Right-Click Tools
@echo off
SETLOCAL EnableDelayedExpansion
:: Check if running as admin (required for registry edits)
net session >nul 2>&1
if %errorLevel% neq 0 (
echo This script requires administrator privileges.
echo Please right-click and "Run as administrator".
pause
exit /b
@neiser
neiser / conventional-commit-regex-for-gitlab.yml
Last active March 27, 2025 13:58
Conventional Commit Regex for GitLab Push Rule
# The regex is split into a YAML sequence for better commenting
# Use
# yq 'join("")' conventional-commit-regex.yml
# to get the actual regex string!
# Test changes using
# https://regex101.com/r/tl6h3n/6 (please update this if you make some changes below)
# See also https://docs.gitlab.com/user/project/repository/push_rules/#validate-commit-messages
# In particular, note that GitLab uses multiline mode by default, so use \A, \z instead of ^ or $
@leehanchung
leehanchung / cli.mjs
Last active May 11, 2025 16:11
formatted claude code cli.mjs
This file has been truncated, but you can view the full file.
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).

Understanding and Preparing for an AI Future

The Gospel According to Chris Barber


This guide synthesises Chris Barber’s AI Prep Notes, a series of conversations and interviews with leading thinkers on advanced AI (chrisbarber.co/AI+Prep+Notes | @chrisbarber). Generated by ChatGPT (o1, 4o canvas). Copied, pasted, prompted, and lightly edited by Eleanor Berger (intellectronica.net).


Hello Goose Community,

We’re thrilled to share some significant updates from the Goose repository! The team has been hard at work, and we have some fantastic new features and improvements that will enhance your experience. Let’s dive in!

🌟 Major Updates

1. Config Management Endpoints

Commit: 9287eaeb5d6f4a8fc302ef1c679a0843c62bcbbe
Authors: Alex Hancock, Lily Delalande
New endpoints for configuration management have been introduced in goose-server. Users can now easily upsert, remove, and manage configuration values, enhancing the server's flexibility and usability.

g.co, Google's official URL shortcut (update: or Google Workspace's domain verification, see bottom), is compromised. People are actively having their Google accounts stolen.

Someone just tried the most sophisticated phishing attack I've ever seen. I almost fell for it. My mind is a little blown.

  1. Someone named "Chloe" called me from 650-203-0000 with Caller ID saying "Google". She sounded like a real engineer, the connection was super clear, and she had an American accent. Screenshot.

  2. They said that they were from Google Workspace and someone had recently gained access to my account, which they had blocked. They asked me if I had recently logged in from Frankfurt, Germany and I said no.

  3. I asked if they can confirm this is Google calling by emailing me from a Google email and they said sure and sent me this email and told me to look for a case number in it, which I saw in

  1. install ollama

brew install ollama

  1. check you can run deepseek:

ollama run deepseek-r1:14b

(bigger model is better - if you can run 70B that is amazing!)

@ashtonmeuser
ashtonmeuser / _summarize.ts
Last active January 21, 2025 03:54
A simple bookmarklet that uses OpenAI ChatGPT to summarize the current webpage
// bookmarklet-title: Summarize
// bookmarklet-about: A simple bookmarklet that uses OpenAI’s ChatGPT to summarize the current webpage. Note that an OpenAI API key is required. Please inspect the bookmarklet source (via the “show editor” or “view gist” buttons) and the bookmarkl.ink project source (github.com/ashtonmeuser/bookmarklet-platform) to ensure that your private data is neither logged nor stored and does not leave your browser.
import Modal from '/ashtonmeuser/0613e3aeff5a4692d8c148d7fcd02f34/raw/7804c7276e855db7a4b2d9ae6801ac6447198810/Modal.ts';
import style from './content.css';
const OPENAI_API_KEY: string = ''; // bookmarklet-var(password): OPENAI_API_KEY
const UUID: string = ''; // bookmarklet-var(uuid): UUID
const errorHtml = (message: string) => `<h1>Error</h1><p>${message}</p>`;