Skip to content

Instantly share code, notes, and snippets.

const fetch = require('node-fetch');
const http = require('http');
const fs = require('fs')
var url = require('url');
const reducer = (accumulator, currentValue) => accumulator + currentValue.contributions;
fetch('https://api.github.com/repos/sindresorhus/caprine')
.then(res => res.json())
.then((json) => {
var out = {}
out.forks = json.forks;
@korneliakobiela
korneliakobiela / .vimrc
Last active August 14, 2017 09:40
.vimrc file with plugins for js-development
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@korneliakobiela
korneliakobiela / Instruction.md
Last active July 11, 2017 07:43
Colorfull and well formated json output from CURL in Linux

Colorful and pretty json output from CURL on Debian-based Linux

Requirements:

Install python 2.7, pip, and pygments.

sudo apt install python python-pip
sudo pip install pygments
import math
n = int(input())
for i in range(n):
a = int(input())
tab = []
m = math.floor(math.sqrt(a))
t = True
if a<2:
t=False
else: