Skip to content

Instantly share code, notes, and snippets.

View mimizone's full-sized avatar

Jeremy Huylebroeck mimizone

  • San Francisco
  • 00:34 (UTC -07:00)
  • X @mimizone
View GitHub Profile
@mimizone
mimizone / start_docker_registry.bash
Created August 8, 2017 01:15 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@mimizone
mimizone / turn off spindumps
Created August 20, 2017 01:08 — forked from ssp/turn off spindumps
Turn off spindump in MacOS X. This can improve the performance of the whole system in some situations.
launchctl unload -w /System/Library/LaunchDaemons/com.apple.spindump.plist
@mimizone
mimizone / gist:814304c945fa16a4bc3d63037f326d57
Created August 20, 2017 05:58
mac os x - convert iso and make bootable usb
diskutil list
diskutil unmountDisk /dev/disk###
hdiutil convert -format UDRW -o image input.iso
sudo dd if=image.dmg of=/dev/rdisk### bs=1m && pid=$!
sudo kill -s INFO $pid
diskutil eject /dev/disk###
@mimizone
mimizone / listdisks.sh
Created August 29, 2017 21:57
list all drives serial numbers using MAAS and jq
#!/bin/sh
PROFILE=ubuntu
API_KEY_FILE=~/maas.key
API_SERVER=172.30.72.130
MAAS_URL=http://$API_SERVER/MAAS/api/2.0
MACHINEID=hx7kdb
maas login $PROFILE $MAAS_URL - < $API_KEY_FILE
@mimizone
mimizone / gist:04d2d8df4d666e2b1caabbb11f0d9011
Created September 29, 2017 17:10
ssh cleanup / automation
#automatic clean up of your ssh config/keys
ssh-keygen -R host
ssh-keyscan host
ssh -oStrictHostKeyChecking=no -l user -i key host
ssh-keygen -t rsa -b 4096
Start > Run > nslookup
> set type=all
> _ldap._tcp.dc._msdcs.DOMAIN_NAME <- replace DOMAIN_NAME with your own example company.com
diskutil list # shows disks
hdiutil convert -format UDRW -o destino.img origen.iso # convert to dmg
sudo dd if=destino.img.dmg of=/dev/rdisk1 bs=1m # copy to USB on rdisk1
for i in {0..255}; do
printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
done
@mimizone
mimizone / gist:83c3e1992747eca31fda3cef5d29db36
Created June 5, 2018 17:03
Show printer details on mac OSX
#enable the web interface of cups
cupsctl WebInterface=yes
#go to http://localhost:631/printers/