Skip to content

Instantly share code, notes, and snippets.

@HouzuoGuo
HouzuoGuo / gist:03cfccbca604b200ccf2273d9b26a00d
Created September 29, 2018 16:37
Useful MacOS software packages available from homebrew
ansible
apache2-utils
autoconf
automake
ca-certificates-mozilla
caca-utils
cloc
conemu
cscope
ctags
# Reinstall SpaceVim along with useful bunch of tools that work well together with SpaceVim.
# This is for Ubuntu 20.04
sudo apt install -y ctags miscfiles python3-dev python3-pip rsync shellcheck software-properties-common wbritish wbritish-huge ruby ruby-dev nodejs gcc g++ make universal-ctags python3-pygments ripgrep
sudo select-default-wordlist
sudo apt-get update
sudo apt-get install -y --reinstall neovim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 5
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 5
@HouzuoGuo
HouzuoGuo / gist:60f399d6c7770c57618f7179e71f3a28
Created September 6, 2018 09:06
OpenSSL self signed CA certificate one liner
openssl req -x509 -sha512 -nodes -extensions v3_ca -newkey rsa:4096 -keyout ca-cert-and-key.pem -days 7320 -out ca-cert-and-key.pem
@HouzuoGuo
HouzuoGuo / gist:07023ea2aa584c13fc4539d29ca2effc
Created August 31, 2018 12:29
Example rules file of laitos software package for Debian
#!/usr/bin/make -f
export DH_VERBOSE = 1
export DH_GOPKG := github.com/HouzuoGuo/laitos
%:
dh $@ --buildsystem=golang --with=golang
override_dh_auto_install:
dh_auto_install -- --no-source
@HouzuoGuo
HouzuoGuo / gist:f8b31ad521af54fe057129f770c7629e
Created August 31, 2018 12:28
Example control file of laitos software package for Debian/Ubuntu
Source: laitos
Section: devel
Priority: optional
Maintainer: Houzuo (Howard) Guo <i@hz.gl>
Build-Depends: debhelper (>= 9), dh-golang, golang-go
Standards-Version: 3.9.8
Homepage: https://github.com/HouzuoGuo/laitos
XS-Go-Import-Path: github.com/HouzuoGuo/laitos
Package: laitos
@HouzuoGuo
HouzuoGuo / gist:c648966928997651ac86cb318efc2d43
Created April 18, 2018 11:55
A basic CloudFormation template for HTTPD running on EC2 in VPC, with EIP.
{
"Description": "Bring up an EC2 that runs apache HTTP server",
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"InstanceType": {
"Description": "EC2 instance type",
"Type": "String",
"Default": "t2.nano"
},
"InstanceAMI": {