Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / terraform cheat sheet
Last active February 28, 2022 23:18
terraform cheat sheet
terraform version
terraform init
terraform apply
terraform destroy
terraform fmt -write=false -diff=true provider.tf -> check for styling issues, displaying the diff onscreen, not
writing the files automatically
generate a dependency graph based on the Terraform configuration
$ terraform graph
--------------------------------------------------
@githubfoam
githubfoam / ceph cheat sheet
Last active August 12, 2021 23:05
ceph cheat sheet
ceph-deploy disk list ceph-server-01 -> To list the disks on a node
ceph-deploy disk zap osdserver1:sdb -> zap a disk (delete its partition table) in preparation for use with Ceph
#Prepare OSDs
ceph-deploy osd prepare osdserver1:sdb:/dev/ssd
ceph-deploy osd prepare osdserver1:sdc:/dev/ssd
#Activate OSDs
ceph-deploy osd activate osdserver1:/dev/sdb1:/dev/ssd1
ceph-deploy osd activate osdserver1:/dev/sdc1:/dev/ssd2
#Create OSDs
@githubfoam
githubfoam / ruby cheat sheet
Last active March 25, 2022 06:36
ruby cheat sheet
============================================================================
# https://www.ruby-lang.org/en/documentation/installation/
============================================================================
$ sudo snap install ruby --classic
$ sudo apt-get install ruby-full
$ sudo yum install ruby
$ sudo pacman -S ruby
$ pkg install ruby
$ brew install ruby
@githubfoam
githubfoam / apparmor cheat sheet
Last active August 12, 2021 23:05
apparmor cheat sheet
sudo apt-get install apparmor-utils
#view the current status of apparmor
sudo apparmor_status
sudo aa-status
#AppArmor profiles
/etc/apparmor.d/
#clear the profiles cache
/etc/init.d/apparmor stop
@githubfoam
githubfoam / openshift origin cheat sheet
Created June 20, 2018 08:25
openshift origin cheat sheet
openshift-all-in-one
#web
https://10.2.2.2:8443/console/
admin/admin
#CLI
oc login https://10.2.2.2:8443
admin/admin
@githubfoam
githubfoam / minio cheat sheet
Created June 20, 2018 08:28
minio cheat sheet
sudo wget https://dl.minio.io/server/minio/release/linux-amd64/minio
sudo chmod +x minio
sudo mv minio /usr/local/bin/
sudo useradd -r minio-user -s /sbin/nologin
sudo chown minio-user:minio-user /usr/local/bin/minio
sudo mkdir /usr/local/share/minio
sudo chown minio-user:minio-user /usr/local/share/minio
sudo mkdir /etc/minio
sudo chown minio-user:minio-user /etc/minio
sudo nano /etc/default/minio
@githubfoam
githubfoam / remnux cheat sheet
Created June 20, 2018 08:34
remnux cheat sheet
build a REMnux system from scratch, use the Ubuntu 14.04 64-bit minimal ISO
a virtual machine, allocate at least 1GB of RAM and 25GB disk
the user named “remnux” with the password “malware”
#command to install the REMnux distro
wget --quiet -O - https://remnux.org/get-remnux.sh | sudo bash
Isolate REMnux within your lab by configuring the virtual appliance to use a “host only” network.
#After switching networks, run the renew-dhcp command in REMnux to refresh its network settings.
renew-dhcp
@githubfoam
githubfoam / CheckpointGW R77.30 Graylog Syslog Integration
Last active June 20, 2018 09:17
CheckpointGW R77.30 Graylog Syslog Integration
#Log in expert mode
# echo $FWDIR
/opt/CPsuite-R77/fw1
# ls -l /opt/CPsuite-R77/fw1/log/
#vi /etc/rc.d/init.d/cpboot
fw log -f -t -n -l $FWDIR/fw1/log/fw.adtlog|logger -p local5.info -t CP_FireWALL &
fw log -f -t -n -l $FWDIR/fw1/log/fw.log|logger -p local5.info -t CP_FireWALL &
fw log -f -t -n -l $FWDIR/fw1/log/fwui.log|logger -p local5.info -t CP_FireWALL &
reboot
@githubfoam
githubfoam / foren6 installation
Created June 20, 2018 09:24
foren6 installation
sudo apt-get install libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc libusb-1.0-0-dev
git clone https://github.com/cetic/foren6.git
cd foren6
make
sudo make install
#source code install 64x
sudo apt-get install libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc libusb-1.0-0-dev
git clone https://github.com/cetic/foren6.git
cd foren6
@githubfoam
githubfoam / contiki + cooja install
Created June 20, 2018 09:27
contiki + cooja install
#source code install 32x
wget https://github.com/contiki-os/contiki/archive/3.0.zip
arc
mv contiki-3.0 contiki
sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug gcc-arm-none-eabi gdb-arm-none-eabi openjdk-8-jdk openjdk-8-jre ant libncurses5-dev
#mspsim directory is empty.
cd contiki/tools/cooja/mspsim
git clone https://github.com/contiki-os/mspsim