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
db.insert({data: 1000}, function(err) { | |
//do something when inserted | |
}) | |
console.log("I don't wait"); | |
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
info it worked if it ends with ok | |
verbose cli [ 'node', '/usr/local/bin/npm', 'install', '-g' ] | |
info using npm@1.0.10 | |
info using node@v0.4.5 | |
verbose config file /home/arunoda/.npmrc | |
verbose config file /usr/local/etc/npmrc | |
silly exec /usr/local/bin/node "/usr/local/lib/node_modules/npm/bin/npm-get-uid-gid.js" "nobody" 1000 | |
silly output from getuid/gid {"uid":65534,"gid":1000} | |
silly output from getuid/gid | |
verbose into /usr/local/lib [ '.' ] |
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
OS: Ubuntu 10.10 | |
NodeJS: v0.4.10 | |
RAM: 2GB | |
Processer: Core 2 Duo 2.0 Ghz |
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
// Arrays | |
var aaa = []; | |
// Stack | |
var aa = [10]; | |
aa.push(20); | |
aa.pop(); //gets 20 |
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
rake |
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
function a() { | |
"use strict" | |
function b() { | |
console.log(arguments.callee.caller); | |
} | |
b(); | |
} | |
a(); |
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
ab -n 100 http://www.mit.kln.ac.lk/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking www.mit.kln.ac.lk (be patient).....done | |
Server Software: Apache/2.2.10 | |
Server Hostname: www.mit.kln.ac.lk |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>kodeincloud HTML5</title> | |
<script type="text/javascript" src="http://static.kodeincloud.com/html5.min.js?appkey=3f76818f507fe7eb6422bd0703c64c88"></script> | |
<script type="text/javascript"> | |
kic.invoke('hello', {name: "arunoda susiripala"}, function(err, resp) { |
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
const GraphQLCache = require('graphql-cache'); | |
const HttpTransport = require('graphql-cache-http-transport'); | |
const React = require('react'); | |
const ReactDOM = require('react-dom'); | |
const Cache = new GraphQLCache({ | |
transport: new HttpTransport('/graphql'); | |
}); | |
// Create the fragment where we can use later on |
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
import Lokka from 'lokka'; | |
import HttpTransport from 'lokka-transport-http'; | |
const client = new Lokka({ | |
transport: new HttpTransport('http://graphql-swapi.parseapp.com/') | |
}); |