Skip to content

Instantly share code, notes, and snippets.

View elreydetoda's full-sized avatar

elreydetoda

View GitHub Profile
@elreydetoda
elreydetoda / Vagrantfile
Created May 25, 2019 13:54
test out and use codi md server (https://demo.codimd.org/), for live rendering markdown, with a vagrant box, navigate to http://192.168.33.10:3000/ to use and create an account to easily aggregate notes. The first Vagrantfile is for when you want to only run codimd, and when you ssh in it will auto start codimd. The second one is an alias for st…
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.network "private_network", ip: "192.168.33.10"
# not necessary but makes things faster (comment out if you use another hypervisor)
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
curl -fsSL https://get.docker.com | bash
@elreydetoda
elreydetoda / CodiMD Server Vagrantfile with alias
Last active May 25, 2019 13:55
test out and use codi md server (https://demo.codimd.org/), for live rendering markdown, with a vagrant box, navigate to http://192.168.33.10:3000/ to use and create an account to easily aggregate notes. The first Vagrantfile is for when you want to only run codimd, and when you ssh in it will auto start codimd. Compared to the second one is an …
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.network "private_network", ip: "192.168.33.10"
# not necessary but makes things faster (comment out if you use another hypervisor)
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
curl -fsSL https://get.docker.com | bash

Keybase proof

I hereby claim:

  • I am elreydetoda on github.
  • I am elrey741 (https://keybase.io/elrey741) on keybase.
  • I have a public key ASCmjduOLv_WDfSAwzgi2PeMP3IXXcWwSDNIh8N6frwQgQo

To claim this, I am signing this object:

@elreydetoda
elreydetoda / .screenrc
Last active September 27, 2019 18:42 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@elreydetoda
elreydetoda / config.cfg
Created October 14, 2019 09:04
algo_blog_post_02 personal algo config for algo blog post: https://blog.secureideas.com/2019/10/wireguard's-pki-in-5-steps-or-less.html
---
# This is the list of users to generate.
# Every device must have a unique username.
# You can generate up to 250 users at one time.
# Usernames with leading 0's or containing only numbers should be escaped in double quotes, e.g. "000dan" or "123".
users:
- phone
- laptop
- desktop
@elreydetoda
elreydetoda / Vagrantfile
Last active October 14, 2019 09:09
algo_blog_post_01 vagrant file for my personal config algo blog post: https://blog.secureideas.com/2019/10/wireguard's-pki-in-5-steps-or-less.html
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND='noninteractive'
sudo apt-get update && sudo apt-get install \
build-essential \
@elreydetoda
elreydetoda / Vagrantfile
Last active October 14, 2019 09:12
algo_blog_post_00 base vagrant box for algo blog post: https://blog.secureideas.com/2019/10/wireguard's-pki-in-5-steps-or-less.html
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND='noninteractive'
sudo apt-get update && sudo apt-get install \
build-essential \
# if you a vanilla install
wget 'https://gist.githubusercontent.com/elreydetoda/bac472aef59fc8d47145c4f25330187b/raw/Vagrantfile'
# if you want my personal config
wget -O Vagrantfile 'https://gist.githubusercontent.com/elreydetoda/bac472aef59fc8d47145c4f25330187b/raw/Vagrantfile.elrey'
## my personal config contains the following customizations
# - pki_in_tmpfs: false - changed to not be in tmpfs so you can continue to use wireguard for long periods of time (although, cool feature checkout more here: https://github.com/trailofbits/algo/issues/145)
# - disables ipsec vpn, to only use wireguard
# - sets the wireguard_PersistentKeepalive to 25 to help with NAT Traversal (https://www.wireguard.com/quickstart/#nat-and-firewall-traversal-persistence)
#!/usr/bin/env bash
zpool export -a
zpool import -N -R /mnt rpool
zpool import -N -R /mnt bpool
# skipping first rpool/ROOT and initial root (i.e. rpool/ROOT/ubuntu), because doesn't have tailing '/' so grabs numbers
zfs list | grep ROOT | tail -n+3
zfs mount rpool/ROOT/ubuntu
zfs mount -a
mount --rbind /dev /mnt/dev
@elreydetoda
elreydetoda / zfs_cmdz.sh
Last active October 23, 2019 03:07
these are the zfs mount and unmount commands based on this: https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS#troubleshooting
#!/usr/bin/env bash
## run all commands by doing
# curl -fsSL 'https://git.io/Je0e6' | sudo bash
## running mount commands
curl -fsSL 'https://git.io/Je0eX' | sudo bash
## running umount commands
# get out of chroot