Skip to content

Instantly share code, notes, and snippets.

zackn9ne zackn9ne

Block or report user

Report or block zackn9ne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hostname.sh
#!/bin/sh
echo "Please enter your desired hostname NO SPACES ALLOWED, use dash"
read HWNAME
scutil --set ComputerName "$HWNAME"
scutil --set LocalHostName "$HWNAME"
dscacheutil -flushcache
@zackn9ne
zackn9ne / dbs.py
Last active Feb 11, 2019
dock bootstrapper
View dbs.py
#!/usr/bin/env python
import urllib2
import os
import subprocess
#download all the things 1/2
filedata = urllib2.urlopen('https://raw.githubusercontent.com/homebysix/docklib/master/docklib.py')
datatowrite = filedata.read()
with open('./docklib.py', 'wb') as f:
@zackn9ne
zackn9ne / tech_dock.py
Last active Feb 11, 2019
make tech_dock
View tech_dock.py
#!/usr/bin/env python
from docklib import Dock
from system import os
def makeDock():
tech_dock = [
'/Applications/Google Chrome.app',
'/Applications/Microsoft Excel.app',
'/Applications/Microsoft Word.app',
'/Applications/Microsoft PowerPoint.app',
@zackn9ne
zackn9ne / stuff.sh
Last active Mar 19, 2019
munki drops
View stuff.sh
SERVER="1.2.3.4."
#client side-set them
sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "http://$SERVER/munki_repo"
sudo defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "basic_manifest"
sudo defaults write /Library/Preferences/ManagedInstalls InstallAppleSoftwareUpdates -bool TRUE
#client side-check them
sudo defaults read /Library/Preferences/ManagedInstalls SoftwareRepoURL
sudo defaults read /Library/Preferences/ManagedInstalls ClientIdentifier
View dockv2.py
# includes eraseDock function in case you mess up
import os
from docklib import Dock
def makeDock():
tech_dock = [
'/Applications/Google Chrome.app',
'/Applications/Microsoft Excel.app',
'/Applications/Microsoft Word.app',
'/Applications/Microsoft PowerPoint.app',
@zackn9ne
zackn9ne / askfvb.sh
Last active Feb 6, 2019
archstarter kit for virtualbox bash *runasroot
View askfvb.sh
#!/bin/sh
#echo "run as root"
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman-key --refresh-keys
sudo useradd -m archie
passwd archie
#lets update
@zackn9ne
zackn9ne / dockme.py
Last active Jan 31, 2019
setup osxdock
View dockme.py
#!/usr/bin/env python
#requires docklib.py
import os
from docklib import Dock
tech_dock = [
'/Applications/Google Chrome.app',
'/Applications/Microsoft Excel.app',
'/Applications/Microsoft Word.app',
'/Applications/Microsoft PowerPoint.app',
'/Applications/Slack.app'
View emacs_deployv2.py
detect = '#+BEGIN_SRC emacs-lisp :exports code'
detectend = '#+END_SRC'
infile = 'c:/Users/netkam/OneDrive - Peralta Community College District/org/1812.org'
outfile = open('C:/Users/netkam/AppData/Roaming/.emacs', 'w')
with open(infile) as input_data:
# Skips text before the beginning of the interesting block:
for line in input_data:
if line.strip() == detect: # Or whatever test is needed
break
@zackn9ne
zackn9ne / update.sh
Last active Dec 2, 2018
sysadmin script to update macOS mojave in various ways (office and macOs)
View update.sh
#!/bin/sh
read -n 1 -s -r -p "Press any key to check macOS updates!"
macvalue=$( softwareupdatre -l | grep -ic "No new software available.")
if [ $macvalue -eq 1 ]
then
echo "No macOS updates"
else
read -n 1 -s -r -p "Press any key to run macOS updates!"
softwareupdate -i -a
@zackn9ne
zackn9ne / boot.sh
Last active Oct 9, 2018
acloudguru ec2 bootstrap script
View boot.sh
#!/bin/bash
yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https perl-Digest-SHA.x86_64 -y
cd /home/ec2-user
curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O
unzip CloudWatchMonitoringScripts-1.2.2.zip
rm CloudWatchMonitoringScripts-1.2.2.zip
You can’t perform that action at this time.