Skip to content

Instantly share code, notes, and snippets.

@pal
pal / upcloud-fresh-bootstrap.sh
Last active May 18, 2026 13:44
Brain VPS fresh-Ubuntu bootstrap (temporary, delete after use)
#!/usr/bin/env bash
# Brain — fresh Ubuntu VPS bootstrap (full re-provisioning)
#
# Service-account model: this script is run by ANY dev, but it always
# authenticates as the intersoliabot GitHub service account so the result
# (cloned repo, cached GHCR creds) is identical regardless of operator.
#
# Prerequisites (one-time, on github.com):
# 1. The `intersoliabot` user exists and is a collaborator on
# intersolia/brain with at least Read access.
@pal
pal / index.html
Created December 7, 2023 14:00
simple table test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 3 Inlined</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container">
@pal
pal / part1.md
Last active October 19, 2020 20:46 — forked from vlandham/part1.md
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how I use feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on main

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout main

Keybase proof

I hereby claim:

  • I am pal on github.
  • I am brattberg (https://keybase.io/brattberg) on keybase.
  • I have a public key whose fingerprint is B7FB 5585 628E 6B60 BCE6 C110 9523 73B4 7AAA 4E32

To claim this, I am signing this object:

@pal
pal / Brewfile
Last active November 27, 2022 00:32
sh <(curl -sL https://goo.gl/2FSNYE)
tap "caskroom/cask"
tap "caskroom/fonts"
tap "caskroom/versions"
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/dupes"
tap 'caskroom/cask'
tap 'caskroom/fonts'
tap 'caskroom/versions'
tap 'homebrew/bundle'
@pal
pal / set_longer_sudoers_timeout.sh
Last active August 29, 2015 14:18
Edit /etc/sudoers from script to add increased timeout (for running kitchen plan provision, tip from https://github.com/pliljenberg/kitchenplan-config)
#!/bin/sh
# Code from http://stackoverflow.com/a/3706774/697243
if [ -z "$1" ]; then
export EDITOR=$0 && sudo -E visudo
else
cat $1 | sed 's/env_reset.*$/env_reset,timestamp_timeout=30/' >> $1
echo "Changed sudoers to increase timeout"
fi
@pal
pal / graphite-functions
Created March 2, 2014 07:21
Some Graphite code
# Good tips here!
# http://obfuscurity.com/2012/04/Unhelpful-Graphite-Tip-1
# graph recent deploys (green = good, red = ouch)
drawAsInfinite(color(jenkins.builds.*.success.duration,"green"))
drawAsInfinite(color(jenkins.builds.*.failure.duration,"red"))
# How many successful/failed builds / day?
color(summarize(sumSeries(group(jenkins.builds.*.success)), "1d"),"green")
color(summarize(sumSeries(group(jenkins.builds.*.failure)), "1d"),"red")
@pal
pal / bootstrap-carousel-slide.js
Created March 6, 2013 07:37
bootstrap-carousel-slide.js with fix for IE
@pal
pal / schema.xml
Created November 11, 2011 13:28
My schema.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@pal
pal / organize_pictures.sh
Created March 20, 2011 21:16
All-in-one script for organizing my massive amount of images. Still not stream-lined for images sans EXIF data and movies.
#!/bin/sh
# Complete script for organizing pictures and removing duplicates
# Setup some constants
SRC_DIR=${1:-"$HOME/Pictures"} # defaults to "$HOME/Pictures" or file argument
DEST_DIR="$HOME/Backuped/originals/pictures"
# use exiftool to organize all pictures, yay!
# http://www.sno.phy.queensu.ca/~phil/exiftool/