Skip to content

Instantly share code, notes, and snippets.

@mikemadden42
mikemadden42 / alpine_dev_setup.sh
Last active April 29, 2017 00:24
Setup for Alpine on Raspberry Pi
# list base packages
apk info -v | sort > apk.base
# upgrade packages
apk update -v && apk upgrade -v
# DEV #
apk add coreutils gcc git go htop make musl-dev openssh procps rsync tmux util-linux vim
# PRD #
@mikemadden42
mikemadden42 / update_go.sh
Last active September 12, 2021 19:21
Go development setup
#!/bin/sh -x
# With go 1.17 use go install to install binaries:
# https://golang.org/doc/go-get-install-deprecation
# TODO: change many of these 'go get' to 'go install'.
# START UTILS
go get -u -ldflags "-s -w" github.com/BurntSushi/toml
go get -u -ldflags "-s -w" github.com/BurntSushi/toml/cmd/tomlv
# go install -ldflags "-s -w" github.com/BurntSushi/toml/cmd/tomlv@latest
@mikemadden42
mikemadden42 / hello.py
Created May 2, 2017 20:29
Python hello
#!/usr/bin/env python
"""Hello example."""
import sys
def hello():
"""Hello function."""
print 'Hello from %s.' % (sys.platform)
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello!")
}
@mikemadden42
mikemadden42 / pip_install.sh
Last active January 2, 2018 16:06
pip install
#!/bin/sh -x
rm -rf $HOME/.pip/cache
pip install --upgrade pip
pip install --upgrade \
Jinja2 \
PyYAML \
awscli \
@mikemadden42
mikemadden42 / SetupApps.ps1
Last active January 26, 2019 14:26
Setup Windows Applications
# command reference
# https://chocolatey.org/docs/commands-reference
# install choco
# https://chocolatey.org/install
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# install packages
choco install 7zip -y
choco install ag -y
@mikemadden42
mikemadden42 / update.sh
Created July 24, 2017 20:53
Update Debian / Ubuntu host
#!/bin/sh
sudo apt update && sudo apt dist-upgrade && sudo apt clean && sudo apt autoremove
# get powershell version
$PSVersionTable
# refresh environment
# useful after installing new tools
refreshenv
# get computer info
Get-WmiObject Win32_ComputerSystem
Get-WmiObject Win32_Processor | Select-Object Name,NumberOfLogicalProcessors,MaxClockSpeed,L3CacheSize
https://docs.kali.org/installation/kali-linux-network-mini-iso-install
Download the latest Kali Linux ISO:
http://http.kali.org/dists/kali-rolling/main/installer-amd64/current/images/netboot/mini.iso
http://http.kali.org/dists/kali-rolling/main/installer-i386/current/images/netboot/mini.iso
Use the docker container:
https://www.kali.org/news/official-kali-linux-docker-images/
https://hub.docker.com/r/kalilinux/kali-linux-docker/
https://github.com/offensive-security/kali-linux-docker
#!/bin/sh
pip3 install --upgrade \
Jinja2 \
PyYAML \
ansible \
ansible-lint \
boto \
boto3 \
flake8 \