- Intro
- Blocking VS Non-Blocking
- Callbacks
- On top of callbacks there are (introduced in later versions of node or through libraries, see bluebird for previous):
- Promises introduced in ES6.
- Async/await
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
#!/bin/sh | |
sudo apt install libopenblas-base libopenmpi-dev gfortran libopenblas-dev liblapack-dev htop libfreetype6 libfreetype6-dev llvm-8 llvm-8-dev llvm-8-runtime sox |
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
( | |
var mergeSort = { |arr| | |
var merge = {|head, tail| | |
var i = 0; | |
var j = 0; | |
var k = head.size + tail.size; | |
head = head.add(0xfffffff); | |
tail = tail.add(0xffffff); | |
k.collect({ |
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
#!/bin/bash | |
# Requirements: | |
# - curl | |
# - jq | |
CLIENT_ID=your-client-id | |
CLIENT_SECRET=your-client-secret | |
USERNAME=publisher-username | |
PASSWORD=publisher-password |
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
#!/bin/bash | |
curl -L -s \ | |
-H 'Accept: application/json; charset=utf-8' \ | |
https://reporting.avocarrot.com/v1/publishers/7214\?access_token\=asdfgdf92bfd67b15195\&granularity\=day |
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
$ curl https://reporting.avocarrot.com/v1/publishers/7214\?access_token\=a065df92bfd67b15195cd0901a30a0a7949c0de2\&granularity\=day | |
{ | |
"query": { | |
"filters": { | |
"publisher_id": [ "7214" ], | |
"app_id": [], | |
"placement_key": [], | |
"country": [] | |
}, | |
"granularity": "day", |
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
JMImplementation:type=MBeanServerDelegate | |
com.sun.management:type=HotSpotDiagnostic | |
java.lang:name=Code Cache,type=MemoryPool | |
java.lang:name=CodeCacheManager,type=MemoryManager | |
java.lang:name=G1 Eden Space,type=MemoryPool | |
java.lang:name=G1 Old Gen,type=MemoryPool | |
java.lang:name=G1 Old Generation,type=GarbageCollector | |
java.lang:name=G1 Perm Gen,type=MemoryPool | |
java.lang:name=G1 Survivor Space,type=MemoryPool | |
java.lang:name=G1 Young Generation,type=GarbageCollector |
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
"use strict"; | |
var __moduleName = "annotations"; | |
var isFunction = $traceurRuntime.assertObject(require('./util')).isFunction; | |
var SuperConstructor = function SuperConstructor() {}; | |
($traceurRuntime.createClass)(SuperConstructor, {}, {}); | |
var TransientScope = function TransientScope() {}; | |
($traceurRuntime.createClass)(TransientScope, {}, {}); | |
var Inject = function Inject() { | |
for (var tokens = [], | |
$__5 = 0; $__5 < arguments.length; $__5++) |
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
#!/usr/bin/php | |
<?php | |
$config = array( | |
'api_key' => 'get your api key from http://www.tumblr.com/oauth/apps', | |
'sleep' => 45, | |
'debug' => true, | |
'blogs' => array( | |
'whiteshoe', | |
'devopsreactions', | |
'afr0diti', |
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
<?php | |
/** | |
* | |
**/ | |
require_once __DIR__.'/../ograph/Graph.php'; | |
require_once __DIR__.'/../ograph/Node.php'; | |
class GraphTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testNodeCreation() |
NewerOlder