Skip to content

Instantly share code, notes, and snippets.

View badstreff's full-sized avatar
🏠
Working from home

Adam Furbee badstreff

🏠
Working from home
View GitHub Profile
@badstreff
badstreff / generate_deployment_report.py
Created July 13, 2016 15:46
Requires an export of the computers to run the report against and the installed software export
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
#
# About: This script is designed to generate a report of an application
# Inputs: Path to the Installed Software export from LANrev, matplotlib
# Author: ajf023@shsu.edu
import sys
import getopt
import matplotlib.pyplot as plt
from ubuntu:14.04
maintainer BadStreff
#run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
run apt-get install -y build-essential git
run apt-get install -y python3 python3-dev python3-setuptools python3-pip
run apt-get install -y supervisor
#run easy_install pip
#!/usr/bin/python
import objc
from Cocoa import NSObject, NSURL, NSBundle
# disturbing hack warning!
# this works around an issue with App Transport Security on 10.11
bundle = NSBundle.mainBundle()
info = bundle.localizedInfoDictionary() or bundle.infoDictionary()
info['NSAppTransportSecurity'] = {'NSAllowsArbitraryLoads': True}
#!/usr/local/opt/python3/bin/python3
# Requirements: bencoder & requests
# - can be gotten via 'pip install bencoder requests'
from bencoder import encode, decode
import hashlib
import requests
import socket
from struct import unpack
{
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"ignored_packages":
[
"Vintage"
],
"rulers":
[
72,
79
#!/usr/bin/python
'''
jss.conf template...
[JSS]
username = api
password = password
URL = https://yourjss.yourcompany.edu:8443
repo_rw_username = username
#!/bin/bash
serial=$(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}')
scutil --set HostName $serial
scutil --set LocalHostName $serial
scutil --set ComputerName $serial
@badstreff
badstreff / check_set_password.sh
Last active December 5, 2016 20:56
What did I just write...
#!/usr/bin/expect -f
set password "PASSWORDGOESHERE"
set r 0
spawn ssh -oStrictHostKeyChecking=no admin@localhost exit
expect "assword:" {
send "$password\r"
expect "assword:" {
set r 1
}
" to be placed in ~/.vim/ftplugin
set autoindent
set cindent
set tabstop=2
set shiftwidth=2
set expandtab
[defaults]
remote_tmp = /tmp/${USER}/tmp
host_key_checking = False