Skip to content

Instantly share code, notes, and snippets.

View ombak's full-sized avatar
🎯
Focusing

Sukma Saputra ombak

🎯
Focusing
View GitHub Profile
cat jan20only.tsv
#20 Jan 2017 Article Kushal Das 5 ways to expand your project's contributor base 2 /article/17/1/expand-project-contributor-base Getting started 690
#20 Jan 2017 Article D Ruth Bavousett How to write web apps in R with Shiny 2 /article/17/1/writing-new-web-apps-shiny Web development 218
#20 Jan 2017 Article Jason Baker "Top 5: Shell scripting the Cinnamon Linux desktop environment and more" 0 /article/17/1/top-5-january-20 Top 5 214
#20 Jan 2017 Article Tracy Miranda How is your community promoting diversity? 1 /article/17/1/take-action-diversity-tech Diversity and inclusion 1007
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
sed '1 d' jan2017articles.csv > jan17no_headers.csv
cut -d',' -f3 jan17no_headers.csv > authors.txt
sort authors.txt | uniq -c > authors-sorted.txt
tail -n3 authors-sorted.txt
# 1 Tracy Miranda
# 1 Veer Muchandi
# 3 VM (Vicky) Brasseur
awk -F "\t" '{print $3 " " $NF}' jan20only.tsv
# Kushal Das 690
# D Ruth Bavousett 218
# Jason Baker 214
# Tracy Miranda 1007
// 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");
emitter.on('newEvent', function(user){
console.log(user);
});
emitter.emit('newEvent', "Sukma Saputra");