Skip to content

Instantly share code, notes, and snippets.

View phips's full-sized avatar
🇬🇧

Mark Phillips phips

🇬🇧
View GitHub Profile
@phips
phips / .vimrc
Created December 29, 2024 18:12
A useful vimrc
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
" vim: set ts=2 sw=2 et:
set nocompatible
" Install vim-plug if we don't already have it
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
@phips
phips / README.md
Last active November 26, 2023 21:54 — forked from ctsrc/README.md
Guide: Run FreeBSD 13.2-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)

Guide: Run FreeBSD 13.2-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)

FreeBSD 13.2-RELEASE for ARM64 boot in QEMU on Apple Silicon Mac screenshot

This guide was adapted from https://gist.github.com/ctsrc/a1f57933a2cde9abc0f07be12889f97f

Running FreeBSD 13.2-RELEASE for ARM64

  1. Install Xcode from App Store or install Command Line Tools on your Mac running on Apple Silicon.
@phips
phips / make_freebsd.sh
Last active July 11, 2023 16:43 — forked from patmaddox/make_freebsd.sh
script to build FreeBSD disk for cloud
#!/bin/sh
set -e
# Adapted from https://www.daemonology.net/blog/2019-02-16-FreeBSD-ZFS-AMIs-now-available.html
if [ ! $# -eq 2 ]; then
echo "Usage: configure.sh <cloud> <disk>"
echo " cloud: aws|gcp"
echo " disk: e.g. da1, nda1"
exit 1
@phips
phips / week1.yml
Last active April 5, 2020 19:22
#TopTipTuesday
ansible tag_type_web -b -m shell -a 'awk "{print \$9}" /var/log/nginx/access.log | sort | uniq -c | sort -k1,1nr 2>/dev/null | column -t'
@phips
phips / Makefile
Created April 16, 2014 21:01
ansible control Makefile
.PHONY: run test
# default inventory file
INV ?= dev
# default play
PLAY ?= site
# If a variable file is encrypted with Vault, create a file with the password
# in and run the make with SWITCHES including '--vault-password-file FILE'.
# Naturally DO NOT put that file in Git!
@phips
phips / cpanm.yaml
Last active February 13, 2016 21:49
Install cpanm on vanilla CentOS 6 Vagrant box with Ansible
---
- hosts: default
user: vagrant
gather_facts: false
sudo: true
tasks:
- name: Ensure gcc installed
yum: name=gcc state=present