Skip to content

Instantly share code, notes, and snippets.

set nocompatible
set path+=**
set number
set backspace=indent,eol,start
set autoindent
set noexpandtab
set tabstop=4
set shiftwidth=4
set colorcolumn=80
highlight ColorColumn ctermbg=0 guibg=lightgrey
@bujiie
bujiie / restartTouchbar
Created September 2, 2021 16:16
Restart mac touchbar when the ESC key disappears
#!/usr/bin/env bash
sudo pkill TouchBarServer
@bujiie
bujiie / prepare-commit-msg
Last active September 8, 2021 22:59
git precommit hook checking for JIRA in commit message.
#!/bin/bash
# Place in project's .git/hooks directory. File must be called "prepare-commit-msg".
# i.e. <project root>/.git/hooks/prepare-commit-msg
FILE=$1
MESSAGE=$(cat $FILE)
current_branch="$(git rev-parse --abbrev-ref HEAD)"
jira_regex='^[[:upper:]]{2,}-[[:digit:]]+[[:space:]]'
@bujiie
bujiie / gxx_search_loc.md
Last active January 13, 2021 20:04
Search locations for gcc/g++
@bujiie
bujiie / conditional_resources.yml
Created May 28, 2020 22:13
Build an S3 resource only if the stage is known (i.e. do not build an S3 bucket for PR stages)
# Referenced from https://gist.github.com/DavidWells/be078deef45f8cb2e280ccc7af947392
resources:
Description: Demo Site
Conditions:
IsProd: {"Fn::Equals" : ["${self:custom.stage}", "prod"]}
IsStaging: {"Fn::Equals" : ["${self:custom.stage}", "staging"]}
IsDev: {"Fn::Equals" : ["${self:custom.stage}", "dev"]}
IsKnownStage: {"Fn::Or": [{"Condition": "IsProd"}, {"Condition": "IsStaging"}, {"Condition": "IsDev"}]}
Resources:
MyS3Bucket:

Keybase proof

I hereby claim:

  • I am bujiie on github.
  • I am meetmaui (https://keybase.io/meetmaui) on keybase.
  • I have a public key ASBFQ9jX_Cbr9te6RQ6Kk-a_cNbeYbbmghVZDZuXcG9-2go

To claim this, I am signing this object: