Skip to content

Instantly share code, notes, and snippets.

@SunboX
SunboX / fxos-HTTP-SMS-Gateway.md
Last active March 30, 2016 21:44
fxos HTTP-SMS-Gateway slides

mozilla.de

Transforming a Firefox OS Phone into a SMS Gateway Server

What's this?

From wikipedia.org:

An SMS gateway allows a computer to send or receive Short Message Service (SMS) transmissions to or from a telecommunications network.

This is a fully functional HTTP-SMS-Gateway server that runs on any device supporting Firefox OS (FxOS).

<device
xmlns="urn:schemas-upnp-org:device-1-0">
<dlna:X_DLNADOC
xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50
</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>NEX-6</friendlyName>
<manufacturer>Sony Corporation</manufacturer>
<manufacturerURL>http://www.sony.com/</manufacturerURL>
<modelDescription>SonyDigitalMediaServer</modelDescription>
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://10.0.0.1:64321/DmsDesc.xml
NT: urn:schemas-upnp-org:service:ConnectionManager:1
NTS: ssdp:alive
SERVER: Linux/2.6 UPnP/1.0 NEX-6/1.0
USN: uuid:00000000-0000-0010-8000-2002af0fa742::urn:schemas-upnp-org:service:ConnectionManager:1
X-AV-Physical-Unit-Info: pa=""; pl=;
X-AV-Server-Info: av=5.0; hn=""; cn="Sony Corporation"; mn="Sony_DSC"; mv="1.0";
This file has been truncated, but you can view the full file.
--------- beginning of /dev/log/system
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
W/SocketClient( 170): write error (Broken pipe)
@SunboX
SunboX / basic-http-auth-node.js
Last active May 1, 2023 19:02 — forked from cojohn/basic-http-auth-node.js
Basic HTTP Authorization Header in Node.js
var key = <my key>,
secret = <my secret>,
https = require("https"),
https_options = {
"host": <host>,
"path": <path>,
"port": <port>,
"method": <method>,
"headers": {
"Authorization": "Basic " + new Buffer(key + ":" + secret, "utf8").toString("base64")
@SunboX
SunboX / delete_addon.js
Created July 23, 2015 16:24
If you did a addon a you've broken the addon settings - so you can't delete you addon anymore - try this... Open your WebIDE and open the "Settings" app on your phone ... Go to the Command Prompt and enter:
var AddonManager = require('modules/addon_manager');
console.log(AddonManager.addons.array);
// Look for Array [ { _app: { manifestURL: 'app://45ba8d82-cb9b-46de-8cb4-5911a9167353/manifest.webapp' } } ]
AddonManager.findAddonByManifestURL('app://45ba8d82-cb9b-46de-8cb4-5911a9167353/manifest.webapp').then((addon) => { AddonManager.deleteAddon(addon); });
@SunboX
SunboX / gaia_gallery_files.json
Created July 15, 2015 19:41
gaia gallery files
@SunboX
SunboX / README.md
Last active August 29, 2015 14:24 — forked from hawkrives/README.md

from http://tips.naivist.net/2006/02/02/word_to_markdown_converter/ Word to Markdown converter

Some smart people who didn’t want to teach users how to code in HTML invented Textile markup language

Someone more lazy invented MarkDown syntax which is much easier to learn. MarkDown is really nice for small content management systems, blogging engines etc.

For instance, to mark text as bold, you write the “bold text” like “bold text”. Other rules can be found in the syntax page.

However, when you have a MS Word document with several pages of bolds, italics and lists, you don’t really want to re-code all the markup.

@SunboX
SunboX / MozWkndDE_FirefoxOS_Workshop.md
Last active August 29, 2015 14:24
Mozilla Weekend Berlin - 12.07.2015 - Firefox OS Workshop

Mozilla Weekend Berlin - 12.07.2015 - Firefox OS Workshop

For developing and debugging Firefox OS and Firefox OS Apps, we recommend using Firefox Developer Edition and the WebIDE bundled with Firefox.

Some Topics you might be interested in

/*
YOU'LL BE ABLE TO PERFORM A CROSS DOMAIN REQUEST IF YOUR APP IS CERTIFIED OR PRIVILEDGED.
FOR MORE INFO CHECK THE PERMISSIONS MATRIX: https://docs.google.com/spreadsheet/ccc?key=0Akyz_Bqjgf5pdENVekxYRjBTX0dCXzItMnRyUU1RQ0E#gid=0
First you'll need to setup the permission for doing the cross domain request on your application manifest.
Go to your app manifest, to the permissions section and add the following:
"systemXHR": {}