Skip to content

Instantly share code, notes, and snippets.

@maesa
maesa / dnsmasq OS X.md
Created November 21, 2022 12:04 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@maesa
maesa / splitter.sh
Last active September 24, 2018 19:29 — forked from steezeburger/splitter.sh
Bash script for splitting large CSV files while keeping the header into 100 lines a piece using Split. Outputs as Part1, Part2, ... while keeping its Header
#!/bin/bash
FILENAME=filename_here.csv
HDR=$(head -1 $FILENAME)
split -l 100 $FILENAME xyz
n=1
for f in xyz*
do
if [ $n -gt 1 ]; then
echo $HDR > Part${n}.csv
fi