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
# imac target display mode function | |
alias imac='function _imac(){ | |
if [ $1 = "start" ]; then | |
echo "--- MacBook Bluetooth on..."; | |
blueutil on; | |
sleep 1; | |
echo "--- Connecting to iMac via ssh..."; | |
ssh -2 -p 22 aaronrutley@aaronimac.local sh ~/tdm/start.sh; | |
fi |
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
# start.sh | |
osascript -e 'tell application "System Events" to key code 144 using command down' | |
echo "--- Target Display Mode Started......." | |
blueutil off | |
echo "--- iMac Bluetooth off..." | |
exit |
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.sh | |
echo "--- Remote iMac Shutting Down......"; | |
osascript -e 'tell application "Finder" to shut down'; |
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
#chassis | |
alias chassis='function _chassis(){ | |
if [ $1 = "create" ]; then | |
cd ~/Vagrant-local; | |
git clone --recursive https://github.com/Chassis/Chassis $2; | |
rm -rf .git; | |
cd $2; | |
git clone https://aaronrutley@bitbucket.org/aaronrutley/turbo.git content; | |
cd content; |
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
# WP, ACF and PHP snippets | |
'.text.html.php:not(.source)': | |
'ACF Field': | |
'prefix': 'acf' | |
'body': ''' | |
<?php the_field( '${1:field_name}' ); ?> | |
''' | |
'ACF Image': |
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
<?php | |
// ar_user_login : on WordPress login, post a message to slack | |
function ar_user_login($user_login) { | |
// get the user info | |
$user = get_user_by('login',$user_login); | |
// get the user ID | |
$user_id = $user->ID; | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title>My App</title> | |
<style type="text/css"> | |
body { |
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
<?php | |
function ar_ig_get_photos() { | |
// set end point (json) | |
$endpoint = "https://api.instagram.com/v1/users/etc-json"; | |
// Initiate curl | |
$ch = curl_init(); |
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
# end.sh | |
blueutil on | |
echo "--- iMac Bluetooth on..." | |
sleep 5 | |
echo "--- Target Display Mode command..." | |
osascript -e 'tell application "System Events" to key code 144 using command down' | |
echo "--- Target Display Mode Ended......." | |
exit |
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
## right time prompt | |
RPROMPT='[%t]' |