Skip to content

Instantly share code, notes, and snippets.

@ilude
ilude / KVM Install Notes
Last active January 2, 2017 07:38
KVM Notes
# https://help.ubuntu.com/community/KVM/Installation
sudo apt-get install qemu-kvm libvirt-bin bridge-utils
sudo usermod -a -G libvirtd $USER
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
# autostart on boot
@ilude
ilude / portmap.ps1
Created December 20, 2016 14:07
Powershell script to setup localhost port fowarding for a vagrant box using the hyper-v provider
# place this script into a directory with your Vagrantfile and update the $ports hashtable below
# ./portmap up => brings portmapping up
# ./portmap down => brings portmapping down
# ./portmap list => lists portmapping
param (
[string]$command = "up"
)
@ilude
ilude / Raspbian Jessie Setup
Last active May 23, 2022 22:58
Raspbian Jessie Setup
# after burning image to sd card create an empty file named "ssh" (no file extension)
# on the root of the sd card. This will enable the ssh server when the raspberry pi boots
# Default User: pi
# Default password: raspberry
# update all software
sudo apt update && sudo apt dist-upgrade -y && sudo apt-get autoremove && sudo apt-get clean
# minimum gpu memory
@ilude
ilude / Build a new rails project
Last active March 1, 2022 14:16
Notes on docker and building a new rails project
Notes on docker and building a new rails project
@ilude
ilude / GlusterfFS setup history
Last active February 7, 2018 03:42
GlusterFS notes
4 sudo service glusterfs-server status
5 sudo gluster peer status
6 cat /vagrant/tmp/cluster_nodes
7 ifconfig
8 sudo gluster peer probe 192.168.2.107
9 sudo gluster peer probe 192.168.2.123
10 sudo gluster peer status
11 cat /vagrant/tmp/cluster_nodes
12 sudo gluster volume create glustertest replica 3 transport tcp 192.168.2.145:/brick 192.168.2.107:/brick 192.168.2.123:/brick force
13 sudo gluster volume start glustertest
# edgerouter setup notes on OpenVPN, cloudflare ddns and letsencrypt
@ilude
ilude / RabbitMQ remote health check
Created May 3, 2018 13:15
RabbitMQ remote health check
sneakers:
image: npi/rms-web
container_name: rms-sneakers
command: >
/bin/bash -c "
while ! wget -sq http://rabbitmq:15672 &> /dev/null; do
echo Delaying startup till rabbitmq is up...;
sleep 1;
done;
echo Starting Sneakers...;
@ilude
ilude / !DockerBuild.md
Last active December 31, 2023 15:27
Docker Host Setup
apt-get update
apt-get dist-upgrade -y --force-yes
apt-get remove gnome-core
apt-get install xrdp lxde-core lxde kali-defaults kali-root-login desktop-base
update-alternatives --config x-session-manager
Choose:
4 /usr/bin/startlxde 50 manual mode
systemctl enable xrdp.service
#!/bin/bash
# this does not need updated when 1setup.sh changes. It always pulls the latests
# curl -s https://gist.githubusercontent.com/ilude/2cf7a3b7712378c6b9bcf1e1585bf70f/raw/setup_node_exporter.sh?$(date +%s) | /bin/bash -s | tee build.log
cd /opt
curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest \
| grep "browser_download_url.*linux-amd64" \
| cut -d ":" -f 2,3 \
| tr -d \" \