This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 30cfa75c352d74c56ebe4f56c3109d73ae0a04bc Mon Sep 17 00:00:00 2001 | |
From: jacquarg <[email protected]> | |
Date: Mon, 4 Dec 2017 14:53:23 +0100 | |
Subject: [PATCH] Add managekonnectors page. | |
--- | |
managekonnectors/app.js | 36 ++++++++++++++++++++++++++++++++++++ | |
managekonnectors/index.html | 33 +++++++++++++++++++++++++++++++++ | |
manifest.webapp | 5 +++++ | |
package.json | 1 + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read stream line by line tool. | |
class ReadLineStream | |
# Applies the function iterator to each line in characters stream, in | |
# series. The next iterator is only called once the current one has | |
# completed. This means the iterator functions will complete in the order | |
# of the lines. | |
# API mimics async.eachSeries. | |
# There isn't error handling yet. | |
eachSeries: (stream, iterator, callback) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
americano = require('americano'); | |
module.exports = ReceiptDetail = americano.getModel('receiptdetail', { | |
'origin': String, | |
'order': Number, | |
'barcode': String, | |
'label': String, | |
'family': String, | |
'familyLabel': String, | |
'section': String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Read in the SSH key | |
echo "Input the key to be added:" | |
read key | |
# Place the key in a temporary file (it's hard to get ssh-keygen | |
# to read from stdin; <<< works for bash, but is non-posix) | |
keyfile=$(tempfile) &&\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# If no project name is given | |
if [ $# -eq 0 ] | |
then | |
# Display usage and stop | |
echo "Usage: create <project.git>" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import cStringIO | |
import codecs | |
class UnicodeCsvReader(object): | |
"From http://stackoverflow.com/a/6187936/1414450." | |
def __init__(self, f, encoding="utf-8", **kwargs): | |
self.csv_reader = csv.reader(f, **kwargs) | |
self.encoding = encoding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su -c "iptables -P FORWARD ACCEPT" | |
su -c "iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SCRIPT language=javascript> | |
function redirectOnUserAgent() { | |
var mapping = { | |
// default : | |
"_default" : "http://www.appsfit.com", | |
// scheme : market://details?id=<package_name> | |
"android": "market://details?id=com.appsfit.android", |