Skip to content

Instantly share code, notes, and snippets.

@glasser
glasser / README.md
Last active April 29, 2026 17:46
pre-push hook to prevent force push (non-fast-forward pushes) by default

Some people love using Git's force push feature. Some people don't. And even among those who do, some people really really don't want agents like Claude Code running force push.

The following Git hook lets you disable force push on your computer. It can be disabled by setting ALLOW_GIT_FORCE_PUSH=I_AM_A_HUMAN_NOT_AN_LLM_AND_I_THE_HUMAN_WANT_TO_FORCE_PUSH, which hopefully your LLM will avoid doing. (It can also be skipped with a particular git flag, but hopefully your agent will avoid that too.)

This is local to your computer: it is not shared with your collaborators. (A more effective way to prevent force push is to configure your Git server to not allow force pushes, such as via GitHub rule sets.)

There are two ways to set this up:

Per repo

This file has been truncated, but you can view the full file.
<html>
<head>
<meta charset="utf-8">
<style> /*! TACHYONS v4.12.0 | http://tachyons.io */
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:butto
@glasser
glasser / .gitignore
Last active December 24, 2020 17:40
Test for not sending errors
node_modules
@glasser
glasser / .gitignore
Last active August 6, 2020 15:40
demo for jest and signals
node_modules
const pem = require('pem');
const fs = require('fs');
let pemFile = fs.readFileSync(process.argv[2], 'utf8');
pemFile = pemFile.replace(/BEGIN PRIVATE KEY/, 'BEGIN RSA PRIVATE KEY');
pemFile = pemFile.replace(/END PRIVATE KEY/, 'END RSA PRIVATE KEY');
pem.getPublicKey(pemFile, function (err, result) {
if (err) {
console.error("ERROR", err);
import { graphql } from "react-apollo";
import gql from "graphql-tag";
import { compose, withState, lifecycle } from "recompose";
const DEFAULT_INTERVAL = 30 * 1000;
const ACTIVE_INTERVAL = 500;
const withData = compose(
// Pass down two props to the nested component: `pollInterval`,
// which defaults to our normal slow poll, and `setPollInterval`,
diff -Nru systemd-229/debian/changelog systemd-229/debian/changelog
--- systemd-229/debian/changelog 2017-10-27 09:43:14.000000000 +0000
+++ systemd-229/debian/changelog 2017-11-16 23:38:35.000000000 +0000
@@ -1,3 +1,9 @@
+systemd (229-4ubuntu22) UNRELEASED; urgency=medium
+
+ * systemd-journald: don't reduce BurstRateLimit when disk space is low
+
+ -- Ubuntu <ubuntu@ip-10-0-2-135.ec2.internal> Thu, 16 Nov 2017 23:37:46 +0000
+
systemd 229
Nov 16 20:24:47 ip-10-0-1-225 systemd-journald[1094]: Suppressed 1355 messages from /system.slice/docker.service
ubuntu@ip-10-0-1-225[i-05add845efb29b6dd] 0 ~$ journalctl -S '20:24:30' -U '20:24:50' -u docker -o json | wc -l
27090
ubuntu@ip-10-0-1-225[i-05add845efb29b6dd] 0 ~$ cat /etc/systemd/journald.conf
[Journal]
# General options
@glasser
glasser / xxx
Created July 31, 2017 17:06
meteor bug: import from only-in-client package crashes isobuild
x