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
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
#!/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
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
# Maintained by: xenatt for: Gigabyte Z77P-D3at: Mon Dec 30 16:01:49 UTC 2013 | |
# Patch Name : GA-Z77P-D3 | |
# Note : base on PJALM Gigabyte General z77 patch | |
# Add the DTGP method | |
into method label DTGP remove_entry; | |
into definitionblock code_regex . insert begin | |
Method (DTGP, 5, NotSerialized)\n | |
{\n | |
If (LEqual (Arg0, Buffer (0x10)\n |
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
GIGABYTE Z77P-D3 DSDT https://gist.github.com/xenatt/8435723/raw/f16bd30b76f655e5fc48d53b3541255612ce261b/Z77P-D3.txt |
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
echo "Start Patch iCloud Service .............." | |
sudo cat > /Library/LaunchDaemons/com.nvram.root.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.nvram.root</string> | |
<key>ProgramArguments</key> | |
<array> |
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
display dialog "Tweet?" default answer "" buttons {"OK"} default button 1 | |
set mytweet to text returned of result | |
tell application "System Events" | |
tell process "Notification Center" | |
click menu bar item 1 of menu bar 1 | |
click button 1 of UI element 1 of row 2 of table 1 of scroll area 1 of window "window" | |
keystroke mytweet | |
keystroke "D" using {command down, shift down} | |
keystroke space |
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
on searchencode(theText) | |
set AppleScript's text item delimiters to " " | |
set theTextItems to text items of theText | |
set AppleScript's text item delimiters to "+" | |
set theText to theTextItems as string | |
set AppleScript's text item delimiters to {""} | |
set AppleScript's text item delimiters to "%0A" | |
set theTextItems to text items of theText | |
set AppleScript's text item delimiters to "" | |
set theText to theTextItems as string |
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
itnsps=`osascript -e "tell application \"System Events\"" -e "if (exists application process \"iTunes\") then" -e "return \"yes\"" -e "else" -e "return \"no\"" -e "end if" -e "end tell"` | |
lasttrack=`tail /tmp/itunestrack` | |
if [ "$itnsps" = "yes" ] | |
then | |
itnsplst=`osascript -e "tell application \"iTunes\"" -e "return (get player state as string)" -e "end tell"` | |
if [ "$itnsplst" = "playing" ] | |
then |
NewerOlder