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 crypto = require('crypto'); | |
| var SaltLength = 9; | |
| function createHash(password) { | |
| var salt = generateSalt(SaltLength); | |
| var hash = md5(password + salt); | |
| return salt + hash; | |
| } |
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 doSomethingOnceAllAreDone(){ | |
| console.log("Everything is done."); | |
| } | |
| function Item(delay){ | |
| this.delay = delay; | |
| } | |
| Item.prototype.someAsyncCall = function(callback){ | |
| setTimeout(function(){ | |
| console.log("Item is done."); | |
| if(typeof callback === "function") callback(); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="nga.js"></script> | |
| </head> | |
| <body> | |
| <div id="txtCDInfo"> | |
| <button onclick="loadXMLDoc()">Get from locations</button> | |
| </div> |
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 debug = require('debug')('boot:create-model-instances'); | |
| module.exports = function(app) { | |
| var User = app.models.user; | |
| var Role = app.models.Role; | |
| var RoleMapping = app.models.RoleMapping; | |
| var Team = app.models.Team; | |
| User.create([ | |
| {username: 'John', email: '[email protected]', password: 'opensesame'}, |
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" : "teacher", "description" : null, "created" : { "$date" : 1414991300446 }, "modified" : { "$date" : 1414991300446 }, "_id" : { "$oid" : "54570dc4a4b45b194d0b5885" } } | |
| { "name" : "admin", "description" : null, "created" : { "$date" : 1414991412700 }, "modified" : { "$date" : 1414991412700 }, "_id" : { "$oid" : "54570e349a721b4f4d86573f" } } | |
| { "name" : "teacher", "description" : null, "created" : { "$date" : 1415188791938 }, "modified" : { "$date" : 1415188791938 }, "_id" : { "$oid" : "545a11378f748c4a578be4ab" } } |
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
| /home/abc/loopback-connector-soap/node_modules/soap/lib/wsdl.js:538 | |
| this.parts[part.$name].namespace = nsName.namespace; | |
| ^ | |
| TypeError: Cannot set property 'namespace' of undefined | |
| at MessageElement.postProcess (/home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:538:40) | |
| at OperationElement.postProcess (/home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:619:13) | |
| at PortTypeElement.postProcess (/home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:639:11) | |
| at BindingElement.postProcess (/home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:653:14) | |
| at ServiceElement.postProcess (/home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:688:15) | |
| at /home/chris/.Trash/test/test/loopback-connector-soap/node_modules/soap/lib/wsdl.js:978:26 |
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
| #!/bin/sh | |
| curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:GetServices" --data @soap_getservices.xml http://bus.hlink.vn/webservice/Server.php |
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
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> | |
| <soapenv:Body> | |
| <soapenv:Fault> | |
| <faultcode>DATA_EMPTY</faultcode> | |
| <faultstring>Không tìm thấy danh sách địa điểm!</faultstring> | |
| </soapenv:Fault> | |
| </soapenv:Body> | |
| </soapenv:Envelope> |
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"), | |
| a; | |
| fs.stat("filename.txt", function(err, stat) { | |
| a = stat.size; | |
| console.log(a); | |
| }); |
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
| ! vim: set filetype=xdefaults : | |
| URxvt.perl-ext-common : default,keyboard-select,url-select,clipboard | |
| URxvt.keysym.M-x : perl:keyboard-select:activate | |
| URxvt.keysym.M-u : perl:url-select:select_next | |
| URxvt.keysym.M-c : perl:clipboard:copy | |
| URxvt.keysym.M-v : perl:clipboard:paste | |
| URxvt.keysym.M-s : perl:keyboard-select:search | |
| URxvt.keysym.M-C-v : perl:clipboard:paste_escaped |