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
osascript -e 'do shell script "sudo echo \"nvram -xp > /nvram.plist;chflags hidden /nvram.plist;\" >> /etc/rc.shutdown.local;sudo nvram -xp > /tmp/nvram;sudo cp -r /tmp/nvram /nvram.plist;sudo rm -rf /tmp/nvram;sudo chflags hidden /nvram.plist;sudo rm -rf /tmp/com.xenatt.fusion.nvram.plist;sudo cat >> /tmp/com.xenatt.fusion.nvram.plist << EOF | |
<?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
<!DOCTYPE plist PUBLIC \"-/Apple/DTD PLIST 1.0/EN\" \"http:/www.apple.com/DTDs/PropertyList-1.0.dtd\"> | |
<plist version=\"1.0\"> | |
<dict> | |
<key>Label</key> | |
<string>com.xenatt.fusion.nvram</string> | |
<key>KeepAlive</key> | |
<true/> | |
<key>RunAtLoad</key> |
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 | |
path=${1%/} | |
user=${2} | |
group="www-data" | |
help="nHelp: This script is used to fix permissions of a drupal installationnyou need to provide the following arguments:nt 1) Path to your drupal installationnt 2) Username of the user that you want to give files/directories ownershipnNote: "www-data" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this scriptnnUsage: (sudo) bash ${0##*/} drupal_path user_namen" | |
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then | |
echo "Please provide a valid drupal path" | |
echo -e $help |
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 u to do shell script "uuidgen" | |
set the clipboard to u | |
display dialog "UUID in Clipboard:" with title "UUID Generator" default answer u buttons "OK" default button "OK" |
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 x to do shell script "perl -e 'printf \"%02X%02X%02X%02X%02X%02X | |
\", rand 0xFF, rand 0xFF, rand 0xFF, rand 0xFF, rand 0xFF, rand 0xFF'" | |
set the clipboard to x | |
display dialog "Mac Address in Clipboard:" with title "Mac Adress Generator" default answer x buttons "OK" default button "OK" |
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
-- base on | |
-- TweetViaTweetbot.applescript | |
-- Copy title and URL in the front most window of Safari to Tweetbot with link | |
-- Author: Romain Briche | |
tell application "System Events" | |
if not (exists application process "Tweetbot") then | |
tell application "Tweetbot" to activate | |
end if | |
if not (exists application process "iTunes") then |
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
--Original form | |
-- TweetViaTwitter.applescript | |
-- Copy title and URL in the front most window of Safari to Twitter with link | |
-- Author: Romain Briche | |
tell application "System Events" | |
if not (exists application process "Wedge") then | |
tell application "Wedge" to activate | |
end if | |
if not (exists application process "iTunes") then | |
tell application "iTunes" to activate |
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
-- base on | |
-- TweetViaTweetbot.applescript | |
-- Copy title and URL in the front most window of Safari to Tweetbot with link | |
-- Author: Romain Briche | |
tell application "System Events" | |
if not (exists application process "Wedge") then | |
tell application "Wedge" to activate | |
end if | |
if not (exists application process "iTunes") then |
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
-- base on | |
-- TweetViaTweetbot.applescript | |
-- Copy title and URL in the front most window of Safari to Tweetbot with link | |
-- Author: Romain Briche | |
tell application "System Events" | |
if not (exists application process "Appetizer") then | |
tell application "Appetizer" to activate | |
end if | |
if not (exists application process "iTunes") then |
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
try | |
tell application "Finder" to set fdir to (target of front Finder window) as text | |
tell application "Terminal" | |
do script "cd " & (quoted form of POSIX path of fdir) | |
end tell | |
tell application "System Events" | |
set visible of process "Terminal" to true | |
set frontmost of process "Terminal" to true | |
end tell | |
on error errorMessage number errorNumber |
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
tell application "System Events" | |
repeat with X in application processes | |
if visible of X is true then | |
set visible of X to false | |
else | |
set visible of X to true | |
end if | |
end repeat | |
end tell |
OlderNewer