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 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
#!/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
# 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
# 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
#--------------------------------------------------------------------- | |
# 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
# coding: utf-8 | |
# -------------------- | |
# backup.rb | |
# Ruby 1.8.7 Mac OS X 10.6.7 | |
# -------------------- | |
require 'pathname' | |
module HomeDir | |
def selectfiles |
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
OS X リソースフォークを削除する | |
# for AppleScript at github | |
About file.applescrit | |
file.applescrpt は AppleScript で書かれたコンパイル以前のテキストファイル。 | |
file.scpt はコンパイル済みファイル。 | |
github にfile.scpt を push するとブラウジングできない。従って file.applescrpt を | |
push することになる。file.applescrpt を push する場合の利点について考えてみると。。。 | |
仮に、AppleScript Version が異なるマシンにコピーされた時、コンパイルが通るか通らない |
NewerOlder