Skip to content

Instantly share code, notes, and snippets.

View Sneezry's full-sized avatar
🍑

Zhe Li Sneezry

🍑
View GitHub Profile
const fs = require('fs');
const proxyConfig = require('d:\\home\\site\\wwwroot\\proxies.json');
module.exports = function (context, req) {
proxyConfig.proxies.medium = {
matchCondition: {
route: '/medium/{user}'
},
backendUri: 'https://medium.com/feed/@{user}'
};
const fs = require('fs');
const proxyConfig = require('d:\\home\\site\\wwwroot\\proxies.json');
proxyConfig.proxies.medium = {
matchCondition: {
route: '/medium/{user}'
},
backendUri: 'https://medium.com/feed/@{user}'
};
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
"use strict";
var Registry = require('azure-iothub').Registry;
var connectionString = "HostName=zhe-iot-hub-temperature-demo.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=1vzPlymC....4vGoc=";
var deviceId = 'new-device';
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var Client = require('azure-iothub').Client;
var connectionString = 'HostName=zhe-iot-hub-temperature-demo.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=1vzPl...vGoc=';
var targetDevice = 'new-device';
var methodParams = {
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var Client = require('azure-iothub').Client;
var Protocol = require('azure-iothub').AmqpWs;
var Message = require('azure-iot-common').Message;
var connectionString = 'HostName=zhe-iot-hub-temperature-demo.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=FOqY...tkY=';
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var EventHubClient = require('azure-event-hubs').Client;
var Promise = require('bluebird');
// The Event Hubs SDK can also be used with an Azure IoT Hub connection string.
// In that case, the eventHubPath variable is not used and can be left undefined.
var connectionString = 'HostName=zhe-iot-hub-temperature-demo.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=1vzP...vGoc=';
alert('Hello');
var canvas = document.getElementsByTagName('canvas')[0];
var context = canvas.getContext('2d');
var runner = new Runner();
var insight = 280;
runner.restart();
var keeper = setInterval(function() {
if (!runner || !runner.onKeyDown) {
clearInterval(keeper);
return;
}
10 GRAPH
20 LOCATE 2,5:PRINT "Sudoku Group","Copy by SNAIL (2006)"
21 LOCATE 4,16:PRINT "[3.0]"
30 LOCATE 5,10:PRINT "SNAIL Soft";
40 W$=INKEY$
41 CLS:PRINT "1.Easy","2.Middle","3.Hard","4.From Files"
42 LOCATE 5,10:PRINT "SNAIL Soft";
43 W$=INKEY$
44 IF ASC(W$)=98 THEN L=10:DJ$="EASY":50
45 IF ASC(W$)=110 THEN L=9:DJ$="MIDDLE":50
import binascii
import struct
import time
from bluepy.bluepy.btle import UUID, Peripheral
temp_uuid = UUID("ff51b30e-d7e2-4d93-8842-a7c4a57dfb07")
p = Peripheral("b8:27:eb:ab:c4:d6", "public")
try: