Skip to content

Instantly share code, notes, and snippets.

View dscape's full-sized avatar

Nuno Job dscape

View GitHub Profile
@dscape
dscape / README.md
Last active December 21, 2015 03:59 — forked from mbostock/.block
Throughput by varying write block size

Plot for the Sequential write to file exercise in UoT CS434

Each line represents a different file size:

  • 1MB (baseline)
  • 10MB
  • 50MB
  • 100MB

To see the rest of the work consult github/dscape

@dscape
dscape / fetch.sh
Created July 19, 2013 21:22 — forked from mmalecki/fetch.sh
#!/bin/sh
username=$1
git remote -v | grep "$username"
if [ $? -ne 0 ]; then
project=`git ls-remote --get-url | sed 's/.*\/\([a-z]*\).git/\1/g'`
git remote add "$username" "https://github.com/$username/$project.git"
fi
git fetch "$username"
@dscape
dscape / stud
Last active January 5, 2016 23:49 — forked from ghcopy/stud
#!/bin/sh
### BEGIN INIT INFO
# Provides: stud
# Required-Start: $remote_fs $network $local_fs
# Required-Stop: $remote_fs $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The Scalable TLS Unwrapping Daemon
# Description: stud is a network proxy that terminates TLS/SSL

Overview

PouchDB is a database written in JavaScript for web browsers that has in built sync capabilities.

For a long time 'web' was synonymous with 'online'. That is no longer the case, Mobile web usage is set to overtake desktop web usage shortly and a growing number of examples are showing that web technology is capable of handling the type of applications that were traditionally built using desktop native technology.

The new wave of offline web applications are going to need somewhere to store their data and they are going to need to learn how to move that data around as their user moves from device to device. How about we build a database with that functionality built in?

Objective

@dscape
dscape / git-commit-prefixes
Created February 17, 2012 10:41 — forked from indexzero/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
var url_parts = url.parse(req.url, true);
var query1 = url_parts.query;
// Build the post string from an object
var query=querystring.stringify(query1);
var post_options = {
host: 'steamcommunity.com',
port: '443',
new RegExp(
[
'<',
'(/?)', // 2 - is closing
'([-:\\w]+)', // 3 - name
'((?:\\s+[-\\w]+(?:', '=', '(?:' +
'\\w+|' +
'"[^"]*"|' +
'\'[^\']*\'))?)*)', // 4 - attributes
'(/?)', // 5 - is self-closing
@dscape
dscape / sup
Created September 20, 2011 12:04
Sensor updater
#!/bin/bash
# Sensor updater
# v0.1
echo "==> Updating sensor-tracking"
cd sensor-tracking
git pull origin
cd ..
function XHConn()
{
var xmlhttp, bComplete = false;
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { try { xmlhttp = new XMLHttpRequest(); }
catch (e) { xmlhttp = false; }}}
if (!xmlhttp) return null;
this.connect = function(sURL, sMethod, sVars, fnDone)
{