Skip to content

Instantly share code, notes, and snippets.

View dinukasal's full-sized avatar
💭
dinuksal.github.io

Dinuka Salwathura dinukasal

💭
dinuksal.github.io
View GitHub Profile
@dinukasal
dinukasal / spark_pi_cluster.md
Created November 8, 2017 16:34 — forked from datalove/spark_pi_cluster.md
Getting Spark up and running on RPi

Before starting

  • 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

Configure each Raspberry Pi

Log into the new Raspberry Pi from your machine

  • ssh pi@192.168.1.XXX (default password for pi user is raspberry)
@dinukasal
dinukasal / curl_example.cpp
Created October 16, 2017 14:14 — forked from alghanmi/curl_example.cpp
cURL C++ Example
#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;
}
@dinukasal
dinukasal / index.html
Created September 25, 2016 09:36 — forked from stesie/index.html
AWS IoT-based serverless JS-Webapp Pub/Sub demo
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>AWS IoT Pub/Sub Demo</title>
</head>
<body>
<h1>AWS IoT Pub/Sub Demo</h1>
<form>
<button type="button" id="connect">connect!</button>