Skip to content

Instantly share code, notes, and snippets.

View squillace's full-sized avatar
💭
on the way to wasmcon...

Ralph Squillace squillace

💭
on the way to wasmcon...
View GitHub Profile
╰─ cd $(draft home)/plugins/draft-pack-repo
╭─ 🔋 100%  /usr/local/etc/draft/plugins/draft-pack-repo  424767c4 v0.2.0   ✓  6533  17:20:32
╰─ set -x
+_zsh_highlight_main__precmd_hook:1> _zsh_highlight_main__command_type_cache=( )
+omz_termsupport_precmd:1> emulate -L zsh
+omz_termsupport_precmd:3> [[ '' == true ]]
+omz_termsupport_precmd:7> title '%15<..<%~%<<' '%n@%m: %~'
+title:1> emulate -L zsh
+title:2> setopt prompt_subst
+title:4> [[ '' == *term* ]]
@squillace
squillace / Ubuntu 16.04 on a Surface Book.md
Created April 20, 2017 02:08 — forked from EiNSTeiN-/Ubuntu 16.04 on a Surface Book.md
My notes to get decent hardware support with Ubuntu 16.04 for my Surface Book
@squillace
squillace / autopart.sh
Created February 25, 2017 23:22 — forked from trentmswanson/autopart.sh
Linux bash script to partition and format all data disks in azure
#!/bin/bash
# An set of disks to ignore from partitioning and formatting
BLACKLIST="/dev/sda|/dev/sdb"
# Base directory to hold the data* files
DATA_BASE="/media"
usage() {
echo "Usage: $(basename $0) <new disk>"
}
@squillace
squillace / gist:30a569f7c7fbf52b7ade54cc059090eb
Last active May 5, 2016 07:15
The magic -Q Azure CLI alias

Call: azure vm quick-create -M ~/.ssh/id_rsa.pub -Q RHEL

Output:

info:    Executing command vm quick-create
Resource group name: rhel-quick
Virtual machine name: rhel
Location name: westus
Operating system Type [Windows, Linux]: linux
User name: ops
@squillace
squillace / osx-for-hackers.sh
Last active August 28, 2015 18:59 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@squillace
squillace / README.md
Last active August 29, 2015 14:23 — forked from hofmannsven/README.md