Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sukma Saputra ombak

🏠
Working from home
View GitHub Profile
View ten_command_line_tools_untuk_data_analisis_di_linux_8.sh
sort -nr -t$'\t' -k8 jan20only.tsv | head -n 1
# 20 Jan 2017 Article Tracy Miranda How is your community promoting diversity? 1 /article/17/1/take-action-diversity-tech Diversity and inclusion 1007
View ten_command_line_tools_untuk_data_analisis_di_linux_13.sh
awk -F "\t" '{print $3 " " $NF}' jan20only.tsv
# Kushal Das 690
# D Ruth Bavousett 218
# Jason Baker 214
# Tracy Miranda 1007
View memahami_events_eventemitter_dalam_nodejs_1.js
// ES5 Event Emitter Example
var events = require('events').EventEmitter;
var emitter = new events.EventEmitter();
emitter.on('newEvent', function(user){
console.log(user);
});
emitter.emit('newEvent', "Sukma Saputra");
View memahami_events_eventemitter_dalam_nodejs_4.js
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var User = function(username){
this.username = username;
}
util.inherits(User, EventEmitter);
var user = new User('Krunal Lathiya');
user.on('nuevent', function(props){
console.log(props);