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
module.exports = async function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
const { createCanvas, loadImage } = require('canvas'); | |
const fs = require('fs'); | |
const rawImage = req.body.image; | |
const w = rawImage.width; | |
const h = rawImage.height; | |
console.log(w, h); |
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/bash | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:webupd8team/atom | |
sudo apt-get update -y | |
sudo apt-get install -y -qq git curl vim bluetooth | |
sudo apt-get install -y -qq libbluetooth-dev build-essential openssh-client bluez | |
sudo apt-get install -y atom | |
curl -L https://git.io/n-install | bash -s -- -y | |
. /home/admin/.bashrc | |
# update to versions compatible with Johnny-Five |
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
var fs = require('fs'); | |
if (process.argv.length <= 2) { | |
console.log("Usage: " + __filename + " path/to/directory"); |
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
'use strict'; | |
var Drone = require('rolling-spider'); | |
var temporal = require('temporal'); | |
var d = new Drone(process.env.UUID); | |
d.connect(function () { | |
d.setup(function () { | |
d.flatTrim(); | |
d.startPing(); |
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
var keypress = require("keypress"); | |
var Spark = require("spark-io"); | |
var five = require("johnny-five"); | |
var Sumobot = require("sumobot")(five); | |
var dotenv = require('dotenv'); | |
// load the spark token and device id from .env file | |
dotenv.load(); | |
keypress(process.stdin); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* Simple Way to Raffle things off from Meetup*/ | |
var meetup = $(".member-name"); | |
$(meetup[Math.floor(Math.random() * meetup.length)]).text().trim(); |
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
# To enable empty passwords, change to yes (NOT RECOMMENDED) | |
PermitEmptyPasswords no | |
# Change to yes to enable challenge-response passwords (beware issues with | |
# some PAM modules and threads) | |
ChallengeResponseAuthentication no | |
# Change to no to disable tunnelled clear text passwords | |
#PasswordAuthentication yes |
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
##### | |
# xTuple | |
# | |
# The xTuple-node process allows mobile connections | |
# | |
# Ubuntu UpStart service job | |
# Should install to /etc/init and be named xtuple.conf | |
# Usage: service xtuple (start | stop | status) | |
description "xTuple Node Server" |