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/bash | |
#----------VARIABLES--------- | |
# Manually set ethernet device ID | |
ethernetID="en0" | |
# Put static IPv4 with subnet mask here | |
ethernetIP="10.x.x.x 255.x.x.x" | |
# Organization name (reverse-domain plist format) | |
orgName="org.enterprise.casper" |
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/bash | |
# Pings the IP address that any computer gets when booted to Single-User Mode | |
# Works best to set it to ping every 2 seconds (set refresh rate in Geektool) | |
ping -c 1 10.x.x.x &> /dev/null | |
# If that address is pingable, | |
if [ $? = 0 ];then | |
# Sound the "red alert" klaxon for speakers connected to this computer | |
afplay /Users/Shared/klaxon.mp3 |
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/bash | |
# URL to pull list of known ad servers from | |
adListURL="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext" | |
# Address to send ads to | |
piholeIP="127.0.0.1" | |
# Where the list of ad servers are stored once downloaded | |
# Any file in /etc/dnsmasq.d is loaded automatically when the service starts |
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/python | |
# Universal wallpaper script for 10.6 and up | |
from AppKit import NSWorkspace, NSScreen | |
from Foundation import NSURL | |
from platform import mac_ver | |
from subprocess import call | |
from os import system | |
# Set path here for 10.9 | |
picture_path = "/Library/Desktop Pictures/Custom.jpg" |
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/bash | |
# Jacob Salmela | |
# 2014-07-11 | |
# Fix multiple Recovery HDs created by Casper Imaging from Defect D-007146 | |
# Get last extra Recovery HD by parsing out the bootable Recovery HD, leaving only the extra partitions | |
lastExtraRecovery=$(diskutil list | awk "/Recovery HD/" | grep -v "Apple_Boot" | awk '{print $7}' | tail -n1) | |
# Get Macintosh disk ID | |
systemVolume=$(diskutil list | awk "/Macintosh HD/" | grep -v "Apple_Boot" | awk '{print $7}') |
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/bash | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 12 August 2013 | |
# https://github.com/jakesalmela/ | |
#---------DESCRIPTION-------- | |
# Say command for Linux | |
# Save as /usr/bin/say |
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/bash | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 15 November 2013 | |
# https://github.com/jakesalmela/ | |
#----------RESOURCES--------- | |
# http://askubuntu.com/questions/80371/bash-history-handling-with-multiple-terminals | |
# http://www.csgnetwork.com/epochtime.html |
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/bash | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 3 December 2013 | |
#----------RESOURCES--------- | |
# http://stackoverflow.com/questions/12230762/insert-characters-into-a-string-in-bash | |
#---------DESCRIPTION-------- | |
# Copies the computers serial number into the clipboard and then speaks it aloud so you can write it down |
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
%windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f\ |
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
#----------VARIABLES-------- | |
# API credentials | |
clientID="" | |
clientSecret="" | |
redirectURI="" | |
# OAuth tokens and codes | |
authorizationCode="" | |
# Once you have these two tokens, the script can run automatically. | |
accessToken="" | |
refreshToken="" |
OlderNewer