Skip to content

Instantly share code, notes, and snippets.

View djok's full-sized avatar
💭
Faith, Hope and Charity

Rosen Velikov djok

💭
Faith, Hope and Charity
  • clouWay ood
  • Bulgaria
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@djok
djok / raw2post.sh
Created February 5, 2017 21:02
Raw TCP/IP -> POST HTTP for Mobotix IP Notify
#!/bin/bash
# ----------------------------------------------------------------------------------------
# MOTIVATION
# ----------------------------------------------------------------------------------------
# The current MX camera software (4.4.2.x) is not able to send POST notifications. In
# order to overcome this limitation it's possible to send Raw TCP/IP messages to a gateway
# which converts them into POST HTTP messages and sends them to the Web server
#
# This script listens to incoming TCP/IP messages and converts them into POST HTTP ones
@djok
djok / runBigQuery.js
Created June 7, 2012 08:46
Google SpreadSheets Apps Scripts >>> run BigQuery to Sheet
function runBigQuery(projectId, sql, sheetName) {
var ss = SpreadsheetApp.getActive();
var sheetData = ss.getSheetByName(sheetName);
sheetData.clearContents();
// Run the query
try {
queryResults = BigQuery.Jobs.query(projectId, sql);
}
catch (err) {