Skip to content

Instantly share code, notes, and snippets.

Wed May 31 07:42:00 UTC 2017
#!/usr/bin/env bash
set -o xtrace -o errexit -o pipefail -o nounset
########################################################################################
# CircleCI's current recommendation for roughly serializing a subset
# of build commands for a given branch
#
# circle discussion thread - https://discuss.circleci.com/t/serializing-deployments/153
# Code from - https://github.com/bellkev/circle-lock-test
@phoolish
phoolish / splitter.sh
Created June 13, 2019 15:51 — forked from steezeburger/splitter.sh
Bash script for splitting large CSV files into 100 lines while keeping the header.
#!/bin/bash
FILENAME=file-to-split.csv
HDR=$(head -1 ${FILENAME})
split -l 100 ${FILENAME} xyz
n=1
for f in xyz*
do
if [[ ${n} -ne 1 ]]; then
echo ${HDR} > part-${n}-${FILENAME}.csv
fi
@phoolish
phoolish / init.lua
Last active September 7, 2025 16:59
Hammerspoon lua script to enable DnD Focus on Mac on lockscreen
--[[
DnD Automation Script for Hammerspoon
Purpose:
Automatically enables Do Not Disturb when the screen is locked and disables it
when unlocked, but only if Hammerspoon was the one that enabled it originally.
This prevents interfering with manually-set DnD preferences.
Requirements:
- Hammerspoon installed and running