Skip to content

Instantly share code, notes, and snippets.

RUN apk add tzdata && \
cp /usr/share/zoneinfo/Australia/Sydney /etc/localtime && \
echo "Australia/Sydney" > /etc/timezone && \
date
@buddhike
buddhike / .zshrc
Last active February 11, 2018 01:54
alias glof='git log --pretty=oneline'
ZSH_THEME="bullet-train"
plugins=(git node npm)
source $ZSH/oh-my-zsh.sh
BULLETTRAIN_PROMPT_ORDER=(
time
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 12,
"javascript.validate.enable": false,
"window.reopenFolders": "none",
"editor.renderWhitespace": "none",
"editor.renderIndentGuides": true,
"editor.tabSize": 2,
@buddhike
buddhike / vscode
Created October 6, 2017 03:31
My vscode extensions list
code --install-extension EditorConfig.EditorConfig --install-extension Equinusocio.vsc-material-theme --install-extension PeterJausovec.vscode-docker --install-extension akamud.vscode-theme-onedark --install-extension azemoh.one-monokai --install-extension b4456609.theme-atom-one-light --install-extension bbenoist.vagrant --install-extension dbaeumer.vscode-eslint --install-extension dkundel.vscode-new-file --install-extension donjayamanne.python --install-extension freebroccolo.theme-atom-one-dark --install-extension itryapitsin.Scala --install-extension kimkwanka.theme-atomic-dark --install-extension lukehoban.Go --install-extension marcostazi.VS-code-vagrantfile --install-extension ms-vscode.cpptools --install-extension ms-vscode.csharp --install-extension ms-vscode.PowerShell --install-extension ms-vscode.Theme-MaterialKit --install-extension rebornix.Ruby --install-extension robertohuertasm.vscode-icons --install-extension shanoor.vscode-nginx --install-extension streetsidesoftware.code-spell-checker --i
@buddhike
buddhike / iterm_conf.json
Created June 10, 2017 11:03
iterm config.
{
"Profiles": [
{
"Working Directory" : "\/Users\/Buddhike",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0.3072507977485657,
"Red Component" : 0.3072599768638611,
"Blue Component" : 0.3072560131549835
},
@buddhike
buddhike / hugo_init.sh
Created June 10, 2017 08:58
init hugo repo for deployment
#!/bin/bash
set -e
REPO=$1
REMOTE=$(git remote -v | grep upstream | grep -v grep | cat)
if [ -z $REMOTE ]
then
if [ -z $REPO ]
@buddhike
buddhike / hugo_deploy.sh
Created June 10, 2017 08:56
hugo deployment
#!/bin/sh
set -e
DIR=$(dirname "$0")
if [[ $(git status -s) ]]
then
echo "The working directory is dirty. Please commit any pending changes."
exit 1;
@buddhike
buddhike / dockerfile-gotoolchain
Last active May 12, 2017 22:00
Container with go toolchain.
# Container with go toolchain.
# Create a directory in host and map it to /go volume to persist data between
# multiple commands.
# Usage:
# docker build -t go
# docker run --rm -v [dir-in-host]:/go -v $GOPATH/src/app:/go/src/app go get app
# docker run --rm -v [dir-in-host]:/go -v $GOPATH/src/app:/go/src/app go test app
# docker run --rm -v [dir-in-host]:/go -v $GOPATH/src/app:/go/src/app go build -o app/build/out app
#
FROM centos
@buddhike
buddhike / dockerfile-goapp
Last active May 11, 2017 20:48
Go app template with dumb-init
FROM centos
ENV DOWNLOADS /home/downloads
ENV TOOLS /home/tools
ENV GOROOT $TOOLS/go
ENV GOPATH /home/go
ENV PATH $GOROOT/bin:$PATH
ENV APP [APP-NAME]
ADD . /home/go/src/$APP
@buddhike
buddhike / code.json
Last active April 27, 2017 09:58
VS Code Config
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Menlo",
"editor.fontSize": 15,
"javascript.validate.enable": false,
"window.reopenFolders": "none",
"editor.renderWhitespace": "none",
"editor.renderIndentGuides": true,
"editor.rulers": [
80,