This file contains hidden or 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 getUrlParams() { | |
var result = {}; | |
var params = (window.location.search.split('?')[1] || '').split('&'); | |
for(var param in params) { | |
if (params.hasOwnProperty(param)) { | |
paramParts = params[param].split('='); | |
result[paramParts[0]] = decodeURIComponent(paramParts[1] || ""); | |
} | |
} | |
return result; |
This file contains hidden or 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 req = new XMLHttpRequest() | |
req.open('get', 'https://127.0.0.1:8181/Shopper/949244', true) | |
req.setRequestHeader('Authorization', 'sso-jwt ' + 'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIkVqaTVfc01yaVEifQ.eyJhdXRoIjogImJhc2ljIiwgImZhY3RvcnMiOiB7ImtfcHciOiAxNDk1MjM5ODUwfSwgImZpcnN0bmFtZSI6ICJTaGlodWFuIiwgImZ0YyI6IDEsICJoYmkiOiAxNDk1MjM5ODUwLCAiaWF0IjogMTQ5NTIzOTg1MCwgImp0aSI6ICJQSkt3QWI4cC0wN01HVFdwWFVBUV9RIiwgImxhc3RuYW1lIjogIlNoYW8iLCAicGVyIjogdHJ1ZSwgInBsaWQiOiAiMSIsICJzaG9wcGVySWQiOiAiOTQ5MjQ0IiwgInR5cCI6ICJpZHAiLCAidXNlcm5hbWUiOiAic3NoYW8ifQ.BS8kjmbb7e5lDT4XlEI5i2ji_myQsKv6yuO-R6qBamwycCNo6DVu7DwzCkY5RIcRug-I3l7VxHOMDaZIZrAvV9hpoU8OCWWhCZZ_kawGIFX6RUA06seUXdrt-ZFn5n939t0l7PxBNESd11RS_qTAdiSz-7EjOPIo6lCdyF42F28') | |
req.send() |
This file contains hidden or 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://www.v2ex.com/t/331412 | |
#Remember to go to /etc/apt/apt.conf to comment Acquire::http::Proxy "http://mirrors.aliyun.com/"; | |
sudo /etc/apt/apt.conf | |
sudo touch /etc/apt/apt.conf | |
#Install nodejs | |
curl -sL http://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
#Install redis |
This file contains hidden or 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
private string underscoreToCamelCase(string name) | |
{ | |
if (string.IsNullOrEmpty(name) || !name.Contains("_")) | |
{ | |
return name; | |
} | |
string[] array = name.Split('_'); | |
for(int i = 0; i < array.Length; i++) | |
{ | |
string s = array[i]; |
This file contains hidden or 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
$('#addrBox').on('mouseup keyup', function(){ | |
var $this = $(this); | |
var val = $this.val(); | |
val = val.length; | |
if(val === 0){ | |
$this.attr('autocomplete', 'on'); | |
} | |
else{ | |
$this.attr('autocomplete', 'off'); | |
} |
This file contains hidden or 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
$.ajax({ | |
type:"POST", | |
url: "https://salesproducts.api.test-godaddy.com/v1/pl/1/cart/packages", | |
contentType: "application/json", | |
data: "requestData=" + JSON.stringify({ | |
pkgid: "office365migration_tier3_012mo", | |
qty: 1, | |
itc: "eml_365_workspace", | |
ci: "86495" | |
}), |
This file contains hidden or 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'); | |
function readLines(input, func){ | |
var remaining = ''; | |
var array = []; | |
input.on('data', function(data){ | |
remaining += data; | |
var index = remaining.indexOf('\n'); | |
while(index > -1){ | |
var line = remaining.substring(0, index); |
This file contains hidden or 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 c = [{'32059': 'true'}, {'32074': 'true'}, {'32062': 'true'}, {'32065': 'true'}, {'32068': 'true'}, {'32071': 'true'}]; | |
var keys = []; | |
for(var k in c){ | |
var a = c[k]; | |
keys.push(parseInt((Object.keys(a))[0])); | |
} | |
keys.join(", ") |
This file contains hidden or 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
############# | |
# Support multiple xml files | |
############# | |
input | |
{ | |
file{ | |
path => ["C:/inetpub/logs/FailedReqLogFiles/*/*.xml"] | |
start_position => "beginning" | |
# filter is not thread safe, so have to move the multiline into the input | |
codec => multiline{ |
This file contains hidden or 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
{ | |
"name": "", | |
"version": "0.1.0", | |
"author": "Shihuan Shao", | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"matchdep": "^1.0.0" | |
} | |
} |
NewerOlder