This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launchctl unload -w /System/Library/LaunchDaemons/com.apple.spindump.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#automatic clean up of your ssh config/keys | |
ssh-keygen -R host | |
ssh-keyscan host | |
ssh -oStrictHostKeyChecking=no -l user -i key host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start > Run > nslookup | |
> set type=all | |
> _ldap._tcp.dc._msdcs.DOMAIN_NAME <- replace DOMAIN_NAME with your own example company.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {0..255}; do | |
printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enable the web interface of cups | |
cupsctl WebInterface=yes | |
#go to http://localhost:631/printers/ |
OlderNewer