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
# Admin User | |
#------------------------- | |
myd=`date "+%Y-%m-%d-%H-%M-%S"` | |
# ovverride.plist | |
#------------------------- | |
sudo cat /var/db/launchd.db/com.apple.launchd/overrides.plist > ~/$myd-root-ovverrides.txt | |
sudo lsof -i > ~/$myd-root-lsof.txt | |
# blued |
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 | |
# disable RemoteDesktop | |
# OS X 10.8.2 | |
# https://gist.github.com/3870057 | |
home=$HOME | |
bk=$home/backup-remotedesktop-extentions | |
mkdir $bk |
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
#--------------------------------------------------------------------- | |
# General user | |
#--------------------------------------------------------------------- | |
myid=`id -u` | |
myd=`date "+%Y-%m-%d-%H-%M"` | |
#------------------------- | |
# Defaults write | |
#------------------------- |
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 | |
cname='mycomputername' | |
nbname='mybiosname' | |
# path to /Volumes/not-system-root-volumes | |
#vo=/Volumes/path | |
#--------------------------------------------------------------------- | |
# Unlod airplay, cupsd, netbiosd |
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 | |
# disable bluetooth | |
# OS X 10.8.2 | |
# 2012-10-08 | |
home=$HOME | |
bk=$home/backup-bluetooth-extentions | |
mkdir $bk |
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
script call_scp | |
on load_lib_file(f) | |
# load "dialog.scpt" as object | |
load script (alias f) | |
end load_lib_file | |
on path_lib_dialog() | |
# path to "dialog.scpt" of current directory | |
tell application "Finder" | |
set pstr to (path to me) as alias |
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
# shutdown.scpt | |
# | |
# Mac OS X Lion 10.7.2 | |
# AppleScript's version | |
# => "2.2.1" | |
# application "Finder"'s version | |
# => "10.7.1" | |
## https://gist.github.com/1382281 |
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
framework "ScriptingBridge" | |
# https://gist.github.com/1382271 | |
module MyBridge | |
class RemoveSameSong | |
def initialize | |
i = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes") | |
i.run | |
@filetracks = i.sources[0].userPlaylists[0].fileTracks | |
@h = Hash.new |
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
framework "ScriptingBridge" | |
module MyBridge | |
class ITunes | |
attr_reader :lib, :lib_music | |
def initialize | |
@i = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes") | |
@lib = @i.sources[0].libraryPlaylists[0] | |
@lib_music = @playlist = @i.sources[0].userPlaylists[0] | |
end |
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
# coding: utf-8 | |
# -------------------- | |
# backup.rb | |
# Ruby 1.8.7 Mac OS X 10.6.7 | |
# -------------------- | |
require 'pathname' | |
module HomeDir | |
def selectfiles |
NewerOlder