Skip to content

Instantly share code, notes, and snippets.

Pantelis Zirinis zirinisp

Block or report user

Report or block zirinisp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View xero-google-script-v2.gs
var oauth_nonce = createGuid();
var oauth_timestamp = (new Date().getTime()/1000).toFixed();
var signBase = 'GET' + '&' + encodeURIComponent(requestURL) + '&' +
encodeURIComponent( complexQuery + '&oauth_consumer_key=' + CONSUMER_KEY + '&oauth_nonce=' +
oauth_nonce + '&oauth_signature_method=' + oauth_signature_method + '&oauth_timestamp=' +
oauth_timestamp + '&oauth_token=' + CONSUMER_KEY + '&oauth_version=' + oauth_version + '&page=' + pageNo);
var hSig = rsa.signString(signBase, hashAlg);
var oauth_signature = encodeURIComponent(hextob64(hSig));
@zirinisp
zirinisp / xero-google-script.gs
Created Jun 23, 2019
Xero Google Script Integration
View xero-google-script.gs
// Got the code from https://github.com/csi-lk/google-app-script-xero-api
var API_END_POINT = 'https://api.xero.com/api.xro/2.0';
var INVOICES_END_POINT = '/Invoices';
// Working method to send a request with a payload
function sendRequest(endpoint, method, payload) {
var url = 'https://api.xero.com/api.xro/2.0' + endpoint
var authHeader = getAuthHeader(method, url);
var headers = {
We couldn’t find that file to show.
@zirinisp
zirinisp / Firecloud Nearby GeoQuery
Created Apr 27, 2018
Firecloud Nearby GeoQuery
View Firecloud Nearby GeoQuery
import CoreLocation
extension CLLocationCoordinate2D {
func boundingBox(radius: CLLocationDistance) -> (max: CLLocationCoordinate2D, min: CLLocationCoordinate2D) {
// 0.0000089982311916 ~= 1m
let offset = 0.0000089982311916 * radius
let latMax = self.latitude + offset
let latMin = self.latitude - offset
// 1 degree of longitude = 111km only at equator
@zirinisp
zirinisp / ZohoIagtmEndOfDayReport
Created Nov 4, 2017
Zoho Creator Script for End of Day Report on Zoho Books
View ZohoIagtmEndOfDayReport
// Slack Urls
debugSlackUrl = "https://hooks.slack.com/services/...";
eodReportSlack = "https://hooks.slack.com/services/...";
// Zoho Books
zohoBooksOrganisationId = "...";
cashCustomerId = ...;
creditCardCustomerId = ...;
otherCustomerId = ...;
zohoBooksPettyCashAccountId = ...;
// Zoho Invoice
@zirinisp
zirinisp / SlackLogger.swift
Created Jul 1, 2017
Slack Logger for Swift Kitura
View SlackLogger.swift
import Foundation
import LoggerAPI
import KituraRequest
import SwiftyJSON
struct SlackField {
var title: String
var value: String
var short: Bool = false
You can’t perform that action at this time.