Last active
August 29, 2015 14:02
-
-
Save ericboehs/151176f98682aab65c0b to your computer and use it in GitHub Desktop.
Revisions
-
ericboehs revised this gist
Jun 23, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 @@ -25,8 +25,10 @@ SPARK_TTY="$(spark serial list | grep dev | awk '{print $2}')" stty -f $SPARK_TTY 9600 if [ "$SILENT" != "true" ]; then echo "Reading from Spark Core. Password ommited from output..." echo grep -v Password $SPARK_TTY & cat_pid=$! fi echo -n "w" > $SPARK_TTY -
ericboehs revised this gist
Jun 23, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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,5 +1,9 @@ #! /usr/bin/env bash # # You will need the spark core cli installed first (and nodejs): # npm install -g spark-cli # spark cloud login # # To set SSID and PASSPHRASE, change below or run: # git config spc.wifi.ssid YOUR_SSID # git config spc.wifi.passphrase YOUR_PASSPHRASE -
ericboehs revised this gist
Jun 23, 2014 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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,26 +1,26 @@ #! /usr/bin/env bash # To set SSID and PASSPHRASE, change below or run: # git config spc.wifi.ssid YOUR_SSID # git config spc.wifi.passphrase YOUR_PASSPHRASE set -e SSID="$(git config --get spc.wifi.ssid)" PASSPHRASE="$(git config --get spc.wifi.passphrase)" ENCRYPTION_TYPE=3 SILENT="false" SPARK_TTY="$(spark serial list | grep dev | awk '{print $2}')" [[ ! -e $SPARK_TTY ]] && \ echo "Spark Core not found. Ensure it is connected via USB and in listening mode (flashing blue)." && \ echo "To enter listening mode, hold the mode button for 3 seconds." && \ exit 1 stty -f $SPARK_TTY 9600 if [ "$SILENT" != "true" ]; then cat $SPARK_TTY & cat_pid=$? fi @@ -33,7 +33,7 @@ echo $ENCRYPTION_TYPE > $SPARK_TTY sleep 0.5 echo $PASSPHRASE > $SPARK_TTY if [ "$SILENT" != "true" ]; then sleep 9 kill $cat_pid fi -
ericboehs created this gist
Jun 23, 2014 .There are no files selected for viewing
This file contains hidden or 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,39 @@ #! /usr/bin/env bash # # You will need the spark core cli installed first (and nodejs): # npm install -g spark-cli # spark cloud login # # To set SSID and PASSPHRASE, change below or run: # git config spc.wifi.ssid YOUR_SSID # git config spc.wifi.passphrase YOUR_PASSPHRASE set -e SPARK_TTY="$(spark serial list | grep dev | awk '{print $2}')" SSID="$(git config --get spc.wifi.ssid)" PASSPHRASE="$(git config --get spc.wifi.passphrase)" ENCRYPTION_TYPE=3 SILENT=false [[ -e $SPARK_TTY ]] || echo "Spark Core not found. Aborting.." stty -f $SPARK_TTY 9600 if [ $SILENT != true ]; then cat $SPARK_TTY & cat_pid=$? fi echo -n "w" > $SPARK_TTY sleep 0.5 echo $SSID > $SPARK_TTY sleep 0.5 echo $ENCRYPTION_TYPE > $SPARK_TTY sleep 0.5 echo $PASSPHRASE > $SPARK_TTY if [ $SILENT != true ]; then sleep 9 kill $cat_pid fi