Skip to content

Instantly share code, notes, and snippets.

View Zsoldier's full-sized avatar

Chris Nakagaki Zsoldier

View GitHub Profile
@Zsoldier
Zsoldier / osx-pw-policies.sh
Created November 15, 2022 16:22 — forked from Freccia/osx-pw-policies.sh
Sets Os X Password Policies
#!/bin/sh
###################################################################################
## Create a pwpolicy XML file based upon variables and options included below.
## Policy is applied and then file gets deleted.
## Use "sudo pwpolicy -u <user> -getaccountpolicies"
## to see it, and "sudo pwpolicy -u <user> -clearaccountpolicies" to clear it.
##
## Tested on: OS X 10.10 10.11 10.12
####################################################################################
@Zsoldier
Zsoldier / EdgeOSUpdateHostsBulk.sh
Last active January 17, 2020 03:44 — forked from lanefu/EdgeOSUpdateHostsBulk.sh
Bulk Insert of active EdgeOS dhcp leases into /etc/hosts aka regenerate entries in /etc/hosts
## do this before hand
## vyatta will try to eval show under the wrong circumstances
show dhcp leases > /tmp/leases.txt
### dump below in a file, execute with bash
MY_INTERNAL_DOMAIN=local
IFS=$'\n'
for line in $(printf "$(cat /tmp/leases.txt|tail -n +3|awk '{print $6, $1, $2}')")
do
@Zsoldier
Zsoldier / cloud-init.yaml
Created September 10, 2019 14:09 — forked from syntaqx/cloud-init.yaml
cloud init to install docker on ubuntu
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '8.8.8.8'