Skip to content

Instantly share code, notes, and snippets.

View rrickay's full-sized avatar
🏠
Working from home

Ricky Souza rrickay

🏠
Working from home
View GitHub Profile
@rrickay
rrickay / part-1-question-1.js
Last active March 16, 2020 23:16
Neliti Interview Questions
/*
* Refactor f to use Promises instead of callbacks
*/
const f = (firstName, callback) => {
setTimeout(() => {
if (!firstName) return callback(new Error('firstName is required'))
const fullName = `${firstName} Smith`
return callback(fullName)
}, 2000)
}
const { spawn } = require('child_process')
const chalk = require('chalk')
const { MultiSelect } = require('enquirer')
const { lstatSync, readdirSync } = require('fs')
const { join } = require('path')
const getDirectories = source =>
readdirSync(source).map(name =>
join(source, name)).filter(source => lstatSync(source).isDirectory())
@rrickay
rrickay / introrx.md
Created January 15, 2016 07:38 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@rrickay
rrickay / springer-free-maths-books.md
Created December 29, 2015 16:14 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt