Skip to content

Instantly share code, notes, and snippets.

View Sneezry's full-sized avatar

Zhe Li Sneezry

View GitHub Profile
k1: v1,
k2: v2,
k3: v3,
}, function(result){
//do something
//with result
//using much
//code here.
interactive: 'if_needed'
}, function(fileSystemArray){
//We'll do something with fileSystemArray later
#li2, #li3, #li4 {
display: none;
<button onclick="show(1)">按钮1</button>
<button onclick="show(2)">按钮2</button>
<button onclick="show(3)">按钮3</button>
<button onclick="show(4)">按钮4</button>
<li id="li1">AAAAAA888AAAAAAA</li>
Sneezry / teamcity_azure_worker_role.ps1
Created December 23, 2015 05:53 — forked from YoungjaeKim/teamcity_azure_worker_role.ps1
PowerShell script to deploy package to Azure Worker Role by using teamcity CI build server
#Modified and simplified version of
#Modified and treat error-terminating of
$ErrorActionPreference = "Stop"
$subscription = "[Your Subscription Name]"
$service = "[Your Azure Service Name]"
$slot = "staging" #staging or production
$package = "[ProjectName]\bin\[BuildConfigName]\app.publish\[ProjectName].cspkg"
$configuration = "[ProjectName]\bin\[BuildConfigName]\app.publish\ServiceConfiguration.Cloud.cscfg"
$timeStampFormat = "g"
$deploymentLabel = "ContinuousDeploy to $service v%build.number%"
Sneezry / stuns
Created January 23, 2014 21:09 — forked from zziuni/stuns
# source :
# A list of available STUN server.
from bluepy.btle import Scanner, DefaultDelegate
class ScanDelegate(DefaultDelegate):
def __init__(self):
def handleDiscovery(self, dev, isNewDev, isNewData):
if isNewDev:
print "Discovered device", dev.addr
elif isNewData:
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")
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
// 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 = ';SharedAccessKeyName=iothubowner;SharedAccessKey=1vzP...vGoc=';