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 | |
# script your commands here | |
touch file1 | |
# this is the window block | |
/usr/bin/osascript << EOF | |
tell application "Finder" | |
activate | |
display dialog "Running Maintenance Tasks" buttons {"Finish IT!"} with icon caution |
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 | |
computer_name=$(scutil --get ComputerName) | |
login() { | |
/usr/bin/osascript << EOF | |
tell application "System Events" | |
keystroke "${1}" | |
keystroke return | |
delay 1 |
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 - | |
#=============================================================================== | |
# | |
# FILE: recordname_for_greatest_user.bash | |
# | |
# USAGE: ./recordname_for_greatest_user.bash | |
# | |
# DESCRIPTION: returns DOMAIN\user for the network user with most time on system | |
# * with changes to dscl this no longer works in 10.8 and maybe 10.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 | |
# sets cups to abort-job instead of default stop-job | |
# for all currently installed printers | |
shopt -s nullglob | |
for file in /etc/cups/ppd/* ; do | |
path="${file%.ppd}" | |
name="${path##*/}" |
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 | |
# our naming convention for computers includes first initial & last name of employee | |
# when there is a marriage or some other reason to change the name this is the script | |
# I created to make that easier. | |
main() { | |
read -r -p "What should I change the computer name to? " new_name |
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
set sourceFolder to quoted form of POSIX path of (choose folder) | |
set destFolder to quoted form of POSIX path of (choose folder) | |
do shell script "rsync -auv --ignore-errors --exclude '.Trash' --exclude 'MobileSync' " & sourceFolder & " " & destFolder with administrator privileges |
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 | |
while read -r -d $'\0' file; do | |
mv "${file}" "${file% *}" | |
done < <(find . -iname "* 2" -print0) | |
# here is what it looks lik on the command line |
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
while read -r -d $'\0' skype; do | |
rm -rf "${skype}" | |
done < <(mdfind kMDItemCFBundleIdentifier = "com.skype.skype" -0) |
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
import re, urllib2, json, webbrowser, console, SimpleHTTPServer, SocketServer, sys | |
html_template = """ | |
<html><head><title>Updates</title> | |
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<style media="all"> | |
::-webkit-scrollbar { width: 1px; } | |
html { width: 100%%; height: 100%%; margin: 0; padding: 0; } | |
body { | |
font: normal normal normal 13px/1.5 'Helvetica Neue',Arial,Helvetica,sans-serif; |
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
import urllib2, urlparse, sys, webbrowser | |
itags = {'45': 'webm_720p', | |
'44': 'webm_480p', | |
'43': 'webm_360p', | |
'38': 'mp4_3072p', | |
'37': 'mp4_1080p', | |
'36': 'phone_mp4_240p', | |
'35': 'flv_480p', | |
'34': 'flv_360p', |
OlderNewer