Skip to content

Instantly share code, notes, and snippets.

@logic855
logic855 / gist:59b99392881c11c9dcc1594b1df52164
Created August 6, 2020 14:09 — forked from danmack/gist:6d69a6d2ab08e6dbf8a1727e9c2267a0
SmartOS add disk to bhyve linux container
Adding a new disk to a bhyve vm takes a few steps.
1. increase the quota on the zfs dataset to accomodate the additional
space.
2. create a zvol inside the zone
3. stop the vm and update its configuration to reflect the change
4. start the vm, login and use the disk
# update quota

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@logic855
logic855 / firefly iii install on 18.04.md
Created February 3, 2020 14:10 — forked from philthynz/firefly iii install on 18.04.md
Firefly III install on Ubuntu18.04

Firefly III install on Ubuntu 18.04

These instructions will install Firefly III on Ubuntu 18.04. It includes setup for:

  • PHP 7.2
  • Nginx
  • MariaDB
  • Securing an Ubuntu server
  • Securing Maria DB
  • Let's Encrypt
@logic855
logic855 / tar.gz with gpg-encryption on the fly
Created June 28, 2018 14:30 — forked from revnode/tar.gz with gpg-encryption on the fly
Create a encrypted tar.gz file from a directory on the fly. The encryption is done by GPG with a public key. The resulting filename is tagged with the date of creation. Very usefull for encrypted snapshots of folders.
tar -cvz /<path>/ | gpg --encrypt --recipient <keyID> > /<backup-path>/backup_`date +%d_%m_%Y`.tar.gz.gpg
@logic855
logic855 / keybase.md
Created April 19, 2017 08:19
keybase

Keybase proof

I hereby claim:

  • I am logic855 on github.
  • I am logic855 (https://keybase.io/logic855) on keybase.
  • I have a public key whose fingerprint is 7810 75FF F52B 806A 57FA 8653 208A 09FA 62EF 7D40

To claim this, I am signing this object:

@logic855
logic855 / fetch-tmpl-content
Created February 10, 2017 14:55 — forked from seeder/fetch-tmpl-content
Used for fetching templates from consul for use in consul-template as plugin
#!/bin/sh
TMPL=$1
DESTINATION=/config/consultemplate/template/$TMPL
TMPDESTINATION=/tmp/$DESTINATION
LOGS=/logs/$HOSTNAME
mkdir -p $LOGS
mkdir -p "`dirname $DESTINATION`"
@logic855
logic855 / dz-bashrc
Created January 16, 2017 10:14 — forked from drscream/dz-bashrc
alias dz-search='dz list -c | grep -i'
alias zlogin='dz shell '
function alogin() {
UUID=$(cat ~/.dz/vms.json | jq -r '.[][] | select(.alias=="'${1}'") | .uuid')
dz shell ${UUID}
}
@logic855
logic855 / osx_haproxy.md
Created October 7, 2016 13:39 — forked from drpauldixon/osx_haproxy.md
Compile HAProxy with Lua and OpenSSL on Mac OS X

Compile HAProxy with Lua and OpenSSL on Mac OS X

Tags: osx haproxy lua openssl

Compile LUA:

mkdir ~/oss
wget http://www.lua.org/ftp/lua-5.3.3.tar.gz
tar xvzf lua-5.3.3.tar.gz
@logic855
logic855 / smartos-graphite.sh
Created August 29, 2016 14:44 — forked from anl/smartos-graphite.sh
Bootstrap Graphite on SmartOS
dataset=$(zfs list | grep data | awk '{print $1}')
sudo zfs set mountpoint=/data $dataset
sudo groupadd graphite
sudo useradd -c "Graphite User" -m -d /data/graphite -g graphite -s /bin/bash graphite
sudo pkgin up
sudo pkgin -y ug
sudo pkgin -y in gcc47
sudo pkgin -y in openldap-client
@logic855
logic855 / gist:d358a4dfabec66f2b2cf
Created March 3, 2016 12:52
install weechat smartos
1 pkgin -y fug
2 pkgin in build-essential
3 pkgin in cmake
4 pkgin se ncurses
5 pkgin in ncursesw-5.9nb1
6 pkgin se libcurl
7 pkgin in curl
8 pkgin in zlib
9 pkgin se zlib
10 pkgin se libgcrypt