Last active
December 25, 2015 03:18
Revisions
-
Eric Allen revised this gist
Jan 30, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,11 @@ on run argv set currentDir to do shell script "echo ${PWD##*/}" -- set url if (count of argv) > 0 then set urlString to "http://" & currentDir & "." & tIP & ".xip.io" & item 1 of argv else set urlString to "http://" & currentDir & "." & tIP & ".xip.io" end if -- add url to clipboard set the clipboard to urlString -
Eric Allen revised this gist
Jan 30, 2015 . 1 changed file with 28 additions and 16 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,35 @@ -- generates xip.io url with optional port -- I store this script in my ~/bin directory and then use `ln -s ~/bin/xip.io.scpt` to create a symbolic link in the folder for my current project -- Here's the funciton in my ~/.bashrc file: -- function xipit() { -- port=$@ -- if [ ! -f xip.io.scpt ]; then -- ln -s ~/bin/xip.io.scpt; -- fi -- osascript xip.io.scpt $port; -- } -- call it like this `xipit :3000` to get an xip.io URL with the port set to 3000 --ALFRED USERS: Here's an Alfred workflow based off the previous version of this AppleScript: http://cl.ly/3I28263K3k3t (author's Twitter handle: @DanPhilibin) on run argv -- get IP address set tIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2" if(tIP is "") then set tIP to do shell script "ifconfig en1|grep 'inet '|cut -d ' ' -f 2" end if -- get current directory set currentDir to do shell script "echo ${PWD##*/}" -- set url set urlString to "http://" & currentDir & "." & tIP & ".xip.io" & item 1 of argv -- add url to clipboard set the clipboard to urlString do shell script "echo " & urlString end run -
ericrallen revised this gist
Oct 24, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ -- I store this script in my ~/Sites directory and then use `ln -s ~/Sites/xip.io.scpt` in Terminal to create a symbolic link in the folder for my site -- add this alias to your .bash_profile or .bashrc for quickly using it via Terminal: `alias xipit='osascript xip.io.scpt'` --ALFRED USERS: Here's an Alfred workflow based off this AppleScript: http://cl.ly/3I28263K3k3t (author's Twitter handle: @DanPhilibin) -- get IP address set tIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2" -
ericrallen revised this gist
Oct 9, 2013 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,17 @@ -- get IP address set tIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2" if(tIP is "") then set tIP to do shell script "ifconfig en1|grep 'inet '|cut -d ' ' -f 2" end if -- get current directory set currentDir to do shell script "echo ${PWD##*/}" -- set url set urlString to "http://" & currentDir & "." & tIP & ".xip.io" -- add url to clipboard set the clipboard to urlString do shell script "echo " & urlString -
Eric Allen created this gist
Oct 9, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ -- generates xip.io url -- I store this script in my ~/Sites directory and then use `ln -s ~/Sites/xip.io.scpt` in Terminal to create a symbolic link in the folder for my site -- add this alias to your .bash_profile or .bashrc for quickly using it via Terminal: `alias xipit='osascript xip.io.scpt'` -- get IP address set tIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2" -- get current directory set currentDir to (container of (path to me)) -- set url set urlString to "http://" & currentDir & "." & tIP & ".xip.io" -- add url to clipboard set the clipboard to urlString