- Download Spark 1.4 to your local machine (laptop, or PC)
- Go to 192.168.1.1 to get local IPs for newly connected RPis
ssh [email protected]
(default password forpi
user israspberry
)
// This script sets OSName variable as follows: | |
// "Windows" for all versions of Windows | |
// "MacOS" for all versions of Macintosh OS | |
// "Linux" for all versions of Linux | |
// "UNIX" for all other UNIX flavors | |
// "Unknown OS" indicates failure to detect the OS | |
var OSName="Unknown OS"; | |
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; | |
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; |
1. Go to https://dev.twitter.com/ | |
2. Click on "Sign In" in the upper-right corner. | |
* There is a link to sign up under the username field if you do not already have a Twitter account. | |
* If you sign up for a new account, you'll have to confirm your email before you can get an API key. | |
3. Enter your credentials and sign in. | |
4. Back at https://dev.twitter.com/, click on your avatar in the upper-right corner, then My Applications. | |
5. Click on "Create a new application". | |
6. Fill out the information, agree to the Rules of the Road, do the captcha, and click on "Create your Twitter application". | |
7. In the application page that comes up next, copy down the "Consumer key" and "Consumer secret". This is half of the key info. | |
8. Click on "Create my access token" at the bottom of the application page, under "Your access token". |
#include <iostream> | |
#include <string> | |
#include <curl/curl.h> | |
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
{ | |
((std::string*)userp)->append((char*)contents, size * nmemb); | |
return size * nmemb; | |
} |
ssh [email protected]
(default password for pi
user is raspberry
)#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
The Mosquitto Pub CLI | |
$> mosquitto_pub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/thing' -m "Hello from Mosquitto" | |
The Mosquitto Sub CLI | |
$ mosquitto_sub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/+' |
<?php | |
function require_auth() { | |
$AUTH_USER = 'admin'; | |
$AUTH_PASS = 'admin'; | |
header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
$has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
$is_not_authenticated = ( | |
!$has_supplied_credentials || | |
$_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
$_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
-- split-string-into-rows.sql | |
-- Duane Hutchins | |
-- https://www.github.com/duanehutchins | |
-- Split a string into a mysql resultset of rows | |
-- This is designed to work with a comma-separated string (csv, SET, array) | |
-- To use a delimiter other than a comma: | |
-- Just change all the occurrences of ',' to the new delimiter | |
-- (four occurrences in SET_EXTRACT and one occurrence in SET_COUNT) |
To be able to make all procedures without pain you should have physical keyboard or just install ssh server and connect to your device shell from computer.
Folow this guide to setup ssh server.