Skip to content

Instantly share code, notes, and snippets.

View tonglil's full-sized avatar
:shipit:

Tony Li tonglil

:shipit:
View GitHub Profile
@tonglil
tonglil / main.go
Last active August 29, 2023 00:56
merging and sorting hcl files
package main
import (
"os"
"sort"
"strings"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclwrite"
)
@tonglil
tonglil / status.sh
Created March 21, 2020 00:30
Write to Github commit status from Drone 1.x with curl using .netrc credentials
# https://developer.github.com/v3/repos/statuses/
if [ "${VERBOSE:-false}" = "true" ]; then
set -x
fi
apk add --no-cache curl
cat ~/.netrc | sed "s/github.com/api.github.com/" >> ~/.netrc
cat << EOF > ./data.json
@tonglil
tonglil / userChrome.css
Created November 15, 2018 01:47
Roomy Bookmarks Toolbar
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once in userChrome.css */
.bookmark-item{
margin-left: 0px !important;
margin-right: 0px !important;
padding-left: 2px !important;
padding-right: 2px !important;
padding-top: 2px !important;
padding-bottom: 2px !important;