Skip to content

Instantly share code, notes, and snippets.

@sithu
sithu / application.cpp
Created October 9, 2015 07:22 — forked from harrisonhjones/application.cpp
Spark Community - kokoro - Web Browser Issue
// Original Spark Community Thread: http://community.spark.io/t/how-to-access-the-core-via-we-browser/9711
// Code adapted from: http://arduino.cc/en/Tutorial/WebServer
/* Includes ------------------------------------------------------------------*/
#include "application.h"
SYSTEM_MODE(AUTOMATIC);
TCPServer server = TCPServer(80);
@sithu
sithu / App.java
Created August 6, 2014 21:28 — forked from max747/App.java
package sandbox.spring;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class App {
public static void main(String[] args) {
ApplicationContext context =
new ClassPathXmlApplicationContext("applicationContext.xml");
SampleBean sample = context.getBean(SampleBean.class);
Class Main {
public void bfs()
{
// BFS uses Queue data structure
Queue queue = new LinkedList();
queue.add(this.rootNode);
printNode(this.rootNode);
rootNode.visited = true;
while(!queue.isEmpty()) {
Node node = (Node)queue.remove();
@sithu
sithu / upload.js
Created February 17, 2014 23:31 — forked from sintaxi/upload.js
// to test...
// curl -T path/to/file.tar.gz http://localhost:8000
var http = require('http')
var fs = require('fs')
http.createServer(function(req, rsp){
var file = fs.createWriteStream("mynewfile")
@sithu
sithu / upload.js
Created February 17, 2014 22:33 — forked from sintaxi/upload.js
// to test...
// curl -T path/to/file.tar.gz http://localhost:8000
var http = require('http')
var fs = require('fs')
http.createServer(function(req, rsp){
var file = fs.createWriteStream("mynewfile")
# Artie - Artie Server
#
# Real-time messaging service
description "artie"
start on filesystem
stop on runlevel S
respawn