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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> |
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
$(function() { | |
var speakerDevices = document.getElementById("speaker-devices"); | |
var ringtoneDevices = document.getElementById("ringtone-devices"); | |
var outputVolumeBar = document.getElementById("output-volume"); | |
var inputVolumeBar = document.getElementById("input-volume"); | |
var volumeIndicators = document.getElementById("volume-indicators"); | |
var device; | |
log("Requesting Access Token..."); |
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
exports.handler = function(context, event, callback) { | |
// With timezone: | |
// In Functions/Configure, add NPM name: moment-timezone, version: 0.5.14 | |
// Timezone function reference: https://momentjs.com/timezone/ | |
let moment = require('moment-timezone'); | |
// | |
// timezone needed for Daylight Saving Time adjustment | |
let timezone = event.timezone || 'Australia/Sydney'; | |
console.log("+ timezone: " + timezone); | |
// |
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
function onOpen() { | |
var spreadsheet = SpreadsheetApp.getActive(); | |
var menuItems = [ | |
{name: 'Send SMS...', functionName: 'sendSMSFunction_'} | |
]; | |
spreadsheet.addMenu('| Twilio SMS', menuItems); | |
} | |
function sendSms(to, body) { | |
var messages_url = "https://api.twilio.com/2010-04-01/Accounts/<YOURACCOUNTSID>/Messages.json"; |
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
const express = require('express') | |
const bodyParser = require('body-parser') | |
const crypto = require('crypto') | |
const app = express() | |
const port = 3000 | |
app.use(bodyParser()); | |
app.post('/', (request, response) => { |
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
curl -u xxxxxx:xxxx | |
https://stash.xxxxxxxx.net/rest/api/1.0/projects/AB/repos/xxxxxxxx/pull-requests?state=MERGED\&limit=100 | |
> t.txt | |
jdbc:drill:zk=local> SELECT count(*), t.flatdata.author.`user`.`emailAddress` | |
FROM (SELECT FLATTEN(`values`) as flatdata FROM dfs.rob.`t.json`) t | |
GROUP BY t.flatdata.author.`user`.`emailAddress`; |
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
// https://davidbeath.com/posts/testing-http-responses-in-nodejs.html | |
var expect = require('chai').expect; | |
var request = require('request'); | |
var param1 = xxxxxxxx; | |
var host = 'http://xxxxx'; | |
var BalanceMethod = 'xxxxxxxxxx&' | |
var responseFormat = '&returnformat=json'; |
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
<cfscript> | |
queue = createobject('component', 'ecgateway.owi.business.services.queue'); | |
folderName = createUUID(); | |
</cfscript> | |
<cfdirectory action="create" directory="/tmp/#folderName#" mode="777"> | |
<cffile action="copy" source="/tmp/msns_50k.txt" destination="/tmp/#folderName#/" /> | |
<cfexecute name="split" arguments="-l 500 /tmp/#folderName#/msns_50k.txt /tmp/#folderName#/" /> |
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
wget -r -nc --user="username" --password="password" ftp://server/folder/folder |
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
# ubuntu 14.10 server | |
sudo apt-get update | |
#sudo apt-get install node | |
#sudo apt-get install nodejs | |
#sudo apt-get install npm | |
# set up rest http://www.getrailo.org/index.cfm/whats-up/railo-40-beta-released/features/rest-services/ | |
# set up ngrok on mac https://www.twilio.com/blog/2013/10/test-your-webhooks-locally-with-ngrok.html |
NewerOlder