Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<html> | |
<head> | |
<style> | |
@font-face { | |
font-family: Optimist; | |
src: url("data:font/woff2;base64,d09GMgABAAAAAG7kABEAAAABEtQAAG6CAAEA") format("woff2"), | |
url("https://mktg.capitalone.com/Optimist_W_Rg.woff") format("woff"); | |
} | |
</style> | |
</head> |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=<TWO_LETTER_ISO_COUNTRY_CODE> | |
network={ | |
ssid="<WIFI_NETWORK_NAME>" | |
psk="<WIFI_PASSWORD>" | |
key_mgmt=WPA-PSK | |
} |
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
cd /Volumes/boot | |
touch ssh |
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
ssh pi@<RPI_IP_ADDRESS> |
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
nmap -sn 192.168.0.1/24 |
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
# Enable SSH | |
echo 'ssh' >/tmp/1/ssh | |
# Configure WiFi | |
cat > /tmp/1/wpa_supplicant.conf << EOF | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=<TWO_LETTER_ISO_COUNTRY_CODE> | |
network={ |
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
/* This file is included in the page running the app */ | |
(function() { | |
// create an instance of Socket.IO for listening | |
// to websocket messages | |
var socket = io(); | |
// listen for 'file-change' message | |
socket.on('file-change', function(msg) { | |
console.log('File changed: ' + msg.id); | |
// download the updated module to kick start |
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
// this function will be added to the final bundle produced by | |
// browser-pack using 'prelude' option | |
this.hotUpdate = function(updatedModules) { | |
for (var id in updatedModules) { | |
if(Object.prototype.hasOwnProperty.call(updatedModules, id)) { | |
// clear module definition from cache | |
delete cache[id]; | |
// replace existing module definition from module map | |
modules[id] = updatedModules[id]; | |
// Update module - 'newRequire' is from browser-pack |
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
// response with a JSONP callback function which does hot module replacement | |
app.get('/hot-update', function(req, res){ | |
var moduleId = req.query.id; | |
// wrap the module code around JSONP callback function | |
var hotUpdateScriptTxt = 'hotUpdate({ "' + moduleId + '":[function(require,module,exports){'; | |
// find the updated module in moduleDepsJSON (output from module-deps) | |
var updatedModule = moduleDepsJSON.filter(function(dep) { | |
return dep.id === moduleId; | |
})[0]; | |
// append source of the updated module to the hot update script |
NewerOlder