Skip to content

Instantly share code, notes, and snippets.

View xenatt's full-sized avatar

Nattapong Pullkhow xenatt

View GitHub Profile
-- 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
--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
-- 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
-- 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
-- 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 "Tweetdeck") then
tell application "TweetDeck" to activate
end if
if not (exists application process "iTunes") then
-- 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 "Twitterrific") then
tell application "Twitterrific" to activate
end if
if not (exists application process "iTunes") then
-- 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 "Janetter") then
tell application "Janetter" to activate
end if
if not (exists application process "iTunes") then
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
#!/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
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"