Skip to content

Instantly share code, notes, and snippets.

View mildred's full-sized avatar

Mildred Ki'Lya mildred

View GitHub Profile
@mildred
mildred / README.md
Last active February 23, 2017 11:58
Listen to Pulseaudio RTP stream using gstreamer

This ought to be in the wiki

The command line is :

gst-launch-1.0 udpsrc address=224.0.0.56 port=46194 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:0,0

gst-launch-1.0 udpsrc address=224.0.0.56 port=45678 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:1,0

Of course, you adjust the sink how you want and update the port number according to the method given on the above page of the wiki (tcpdump -n net 224.0.0.0/8 -c 10).

@mildred
mildred / HACKING.firefox
Last active August 29, 2015 14:19
Hacking.firefox
Path from a URL typed by a user to the HTTP request:
- browser.xul
- tabbrowser.xml: <method name="addTab">
- tabbrowser.xml: <browser/>.loadURIWithFlags(...)
- toolkit/content/widgets/browser.xml: <method name="loadURIWithFlags">
- toolkit/content/widgets/browser.xml: nsIWebNavigation::loadURIWithOptions(...)
- docshell/base/nsIWebNavigation.idl (we should add a auth callback to this interface)
alternatives:
- toolkit/modules/RemoteWebNavigation.jsm
@mildred
mildred / README.md
Last active August 29, 2015 14:21 — forked from anonymous/README.md
Getting started with a SPARQL server

Getting started with a SPARQL server

OpenRDF Sesame

Sesame is a J2EE application that is contained in a servlet. This is generally deployed using Tomcat, but we are not going to use that or anything bloatware. Instead we will make use of Winstone, a lightweight application server.

Sesame is composed of two servlets. openrdf-sesame that is best served at /openrdf-sesame and that contain the HTTP REST API to the RDF store. Then there is openrdf-workbench (served from /openrdf-workbench) that is the UI to the server. You don't really need the UI but it's nice to get started and explore the server.

@mildred
mildred / SmartWeb.md
Last active August 29, 2015 14:21
SmartWeb, the new Web

SmartWeb, the new Web

SmartWeb is a concept that tries to unify all the work done in the RDF community with HTML and websites. The goal is to create a web server that is smart enough that server side applications will no longer be necessary, and with completely decentralized content. More specifically:

  • Allow updating pages using HTTP PUT. The page editor can be entirely client-side

  • Automatic gathering of backlinks using the Referer header. The server will fetch the remote resource and try to determine the kind of link that was done (by parsing the HTML resource or querying the remote RDF datastore directly if available)

  • RDF datastore that can be queried easily.

@mildred
mildred / README.md
Last active August 29, 2015 14:22
More on How to Survive the Coming Namespace Winter

More on How to Survive the Coming Namespace Winter

Introduction: custom elements

TBD

The Issue

@mildred
mildred / README.md
Created June 24, 2015 09:47
HTTP/HTML subset for respecting privacy

We can use HTTBy default, HTTP and HTML is not very respecting of our privacy. But, we could make it way better. Let's imagine that out there, there will be some privacy-respecting web servers and browers, how could we do that?

  • A privacy respecting browser should follow as much as possible the privacy subset of HTTP/HTML, and warn when websites do not respect this.
  • The browser should sandbox web views that are not affiliated. History, cookies, and every setting should not be shared at all.
  • The server should use HTTP2 Push to push the assets (including external assets) of a web page served. Any assets that are not part of the push would be considered as not found by the privacy respecting browser.
  • The browser will not attempt to fetch any resource that is not part of the HTTP2 Push
  • When validating a form, performing a XMLHttpRequest or any network access (html refresh, ...), the browser should tell the user (as all old browsers did) "The website is attempting to send information" with the choice to
@mildred
mildred / README.md
Created September 14, 2015 10:49
IPLD thoughts

We go round and round on the same topics in IPLD, so I would like to summarize them. Let's start by stating what we would like:

  • we can put raw JSON in it, and that should work
  • we would like to be compatible with JSON-LD (or at least Linked Data)
  • we want to specify a context/schema that the data is to be interpreted against
  • we would like to have easy detection for links where we concatenate each dict key from the first level to the last using / and we get a link path

These are not directly compatible with each other. We can make several decisions, and this would lead to consequences. I'd like to present it as a tree:

  • We want any arbitrary JSON we put in the system to be strictly the same (same model) as the wire format
@mildred
mildred / freetext.ft
Last active November 20, 2015 13:01
Free Text Language
Section License
===============
This code is in the public domain.
Section Header
This is the name of the compilation unit.
- name := "freetext";
@mildred
mildred / README.md
Created January 29, 2016 20:24
openwrt and raspberry config

OpenWRT Configuration

This configuration makes a WAN interface from a gretun tunnel. The WAN IP is configured in DHCP.

In this configuration, the WAN is the private network of a 4G LTE modem/router that is plugged into a raspberry pi on the house wall. The raspberry py provides the modem/router network on a gretun tunnel.

  • uptun0: gretap tunnel to raspberry py, attaches to upbridge0
  • upbridge0: dhcp client to uplink (the gretap tunnel
@mildred
mildred / README.md
Created February 3, 2016 09:33
Generate Sys-V services managed by daemontools for auto restart

sysvservice.sh usage

Run ./sysvservice.sh generate to generate a Sys-V script that uses daemontools to manage the service (auto restart, ...)

If you want to upgrade to a new version of this script, run ./sysvservice.sh generate old-service-file to keep the same configuration with the new version of the script.