Skip to content

Instantly share code, notes, and snippets.

View pengelbrecht's full-sized avatar

Peter Engelbrecht pengelbrecht

View GitHub Profile
<div>
<div style="font:bold 14px/20px Arial, Helvetica, sans-serif; color:#50B26D; margin: 0; ">
{firstName} {lastName} ⋅ <span style="font-size:12px; color:#404040; ">{title}</span></div>
<div style="font:bold 12px/20px Arial, Helvetica, sans-serif; color:#50B26D; margin: 0; ">
m <span style="font-weight:normal; color:#404040;">{mobilePhone}</span><br />
e <span style="font-weight: normal;"><a href="mailto:{mainEmail}" style="text-decoration: none; color:#404040;">{mainEmail}</a></span></div>
</div>
<div style="margin-top:10px; font:normal 10px/14px Arial, Helvetica, sans-serif; color:#999; width: 340px">
Firmafon er et cloud-baseret telefonsystem til virksomheder. Med Firmafon kan du på få minutter opsætte et komplet telefonsystem med omstillingsbord og mobiltelefoni - helt uden installation af software eller hardware.&nbsp;</div>
require(plyr)
columns = c(
rep("NULL", 4),
"character",
rep("NULL", 12),
"character",
rep("NULL", 33),
"character",
rep("NULL", 8)
# Now read the district ownership list and merge into the total list
require(RCurl)
myCsv = getURL("https://docs.google.com/spreadsheet/pub?key=0AtqalGIOYWlYdHdjbHQ3MmNLODZXdXVuaUVENkZCYlE&single=true&gid=1&range=A1%3AB233&output=csv")
districtowner = read.csv(textConnection(myCsv))
colnames(districtowner) = c("Distrikt", "Seller")
nn = merge(nn, districtowner, by.x = 16, by.y = 1)
sellers = as.character(unique(nn$Seller))
function getIncomingCallStats(from, to, number, userKey) {
var thisCall, open;
var callTime = new Date();
var fromstr = from.toISOString();
var tostr = to.toISOString();
var stats = new Object();
var missed = 0, answered = 0, voicemail = 0, answeredDuration = 0, closed = 0;
var options = {
"method" : "get",
asdf
asdf
var APIKEY = "<INSERT CLOSE.IO API KEY HERE>";
function cioUpdateActivity() {
var activitySheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Activity")
var sellerRange = activitySheet.getDataRange().getValues();
sellerRange.shift();
var sellers = []
for(var i = 0; i < sellerRange.length; i++)
sellers.push(sellerRange[i].slice(0,2));
# Formulas from http://www.mitan.co.uk/erlang/elgcspsh.htm
#input
n = 80 # number of calls
t = 8*60*60 # period length in seconds
d = 4.5*60 # call duration in seconds
M = 2 # number of agents
s = 20 # target SLA in seconds
# Output
# Formulas from http://www.mitan.co.uk/erlang/elgcspsh.htm
#input
n = 80 # number of calls
t = 8*60*60 # period length in seconds
d = 4.5*60 # call duration in seconds
M = 2 # number of agents
s = 20 # target SLA in seconds
# Output
@pengelbrecht
pengelbrecht / testasdf
Created September 30, 2014 13:33
wise words...
// Global variables
var BASEURI = 'https://app.firmafon.dk/api/v1';
var OPENTIME, CLOSETIME;
var SS = SpreadsheetApp.getActiveSpreadsheet();
function readConfig() {
OPENTIME = new Date();
OPENTIME.setHours(SS.getRangeByName("OpenHour").getValue());
OPENTIME.setMinutes(SS.getRangeByName("OpenMinute").getValue());
OPENTIME.setSeconds(0);