Skip to content

Instantly share code, notes, and snippets.

View samqi's full-sized avatar

Sam samqi

  • .MY
View GitHub Profile
@samqi
samqi / awkshortcuts.txt
Last active June 27, 2018 07:31
use awk to clear first column from history
#use awk to output history commands without the numbers
awk '{print $2,$3,$4,$5,$6,$7}' history.txt >> commands.txt
#get the ip addresses https://www.cyberciti.biz/tips/read-unixlinux-system-ip-address-in-a-shell-script.html
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
#get private and public IP for linode node via CLI (old version) https://github.com/linode/cli
linode show linodenode| grep ips | awk '{ print $2,$3}'
@samqi
samqi / spectre-meltdown.sh
Created January 11, 2018 10:00
spectre and meltdown checker
git clone https://github.com/speed47/spectre-meltdown-checker.git
cd spectre-meltdown-checker/
sudo sh spectre-meltdown-checker.sh
@samqi
samqi / virtualbox.bat
Last active March 17, 2020 10:30
virtualbox cli command
# List virtual machines
VBoxManage list vms
"MyVM" {wwwwww-4301-4a7d-8af8-fe02fed00451}
# Start VM in headless mode
VBoxManage startvm MyVM --type headless
# Power off VM
VBoxManage controlvm MyVM poweroff
@samqi
samqi / rc.firewall
Created January 26, 2017 08:23 — forked from lopes/rc.firewall
My template to configure iptables.
#!/bin/bash
#rc.firewall
#
#
# Firewall configuration file.
#
#
# AUTHOR: José Lopes Oliveira Jr. <indiecode.com.br>
#
#