Skip to content

Instantly share code, notes, and snippets.

View marcooliveira's full-sized avatar

Marco Oliveira marcooliveira

View GitHub Profile
@marcooliveira
marcooliveira / collaboration-lifecycle.md
Last active January 7, 2019 12:32
peer-base collaboration lifecycle

Collaboration Lifecycle

Collaborations are the foundation for your app state, enabling you to share this state across devices and users.

Collaborations are a combination of state and channels that are used to transport changes to the state, and each collaboration goes through 4 stages in their lifecycle.

Collaborations are a construct that happens simultaneously in any device or instance collaborating in it, also known as peers, and are identified by a name, which should be universally unique. These peers might be connected to each other or not, and collaborations merge once they find each other.

This guide is intended for both developers and designers, laying down a set of best practices for UX and UI. There is a glossary in the bottom, should you find some term that's not clear.

fs = require('fs')
path = require('path')
request = require('request')
class twitter_update_with_media
constructor: (@auth_settings) ->
@api_url = 'https://api.twitter.com/1.1/statuses/update_with_media.json'
post: (status, file_path, callback) ->
r = request.post(@api_url, oauth:@auth_settings, callback)
#telnet into the drone (telnet 192.168.1.1)
#paste the following command:
killall udhcpd; iwconfig ath0 mode managed essid [ssid]; ifconfig ath0 [wanted ip] netmask 255.255.255.0 up;
#ex. killall udhcpd; iwconfig ath0 mode managed essid Roflcopter; ifconfig ath0 192.168.43.201 netmask 255.255.255.0 up;
@marcooliveira
marcooliveira / static_server.js
Created June 13, 2012 22:34 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);