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 post referred to this git. I just trimmed cam and wifi part. | |
// https://github.com/v12345vtm/CameraWebserver2SD/blob/master/CameraWebserver2SD/CameraWebserver2SD.ino | |
#include "FS.h" | |
#include "SD_MMC.h" | |
//List dir in SD card | |
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){ | |
Serial.printf("Listing directory: %s\n", dirname); |
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
#!/bin/sh | |
# Allow locate commands | |
# sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist | |
# xcode command line - Select: "Get xcode" and go get a coffee (preferably far from your desk :) | |
xcode-select --install | |
# home-brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
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
// Original from: http://killzonekid.com/worlds-smallest-fastest-xml-to-json-javascript-converter/ | |
// Thanks to Loamhoof for helping get this working! | |
// http://stackoverflow.com/questions/15675352/regex-convert-xml-to-json/15680000 | |
//Load XML into XML variable | |
var regex = /(<\w+[^<]*?)\s+([\w-]+)="([^"]+)">/; | |
while (xml.match(regex)) xml = xml.replace(regex, '<$2>$3</$2>$1>'); | |
xml = xml.replace(/\s/g, ' '). |
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
Backbone.Cloudant.database = "/sandbox/"; | |
// start the change handler | |
// Backbone.Cloudant.changeHandler(); | |
PersonView = Backbone.View.extend({ | |
initialize: function () { | |
this.render(); | |
}, | |
template: _.template($("#person_template").html()), |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |