Skip to content

Instantly share code, notes, and snippets.

💭
working hard on zerotoherojs.com

Volkan Özçelik v0lkan

💭
working hard on zerotoherojs.com
Block or report user

Report or block v0lkan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@v0lkan
v0lkan / loop.js
Created Jan 19, 2019
Promise Loop
View loop.js
/*
* \
* \\,
* \\\,^,.,,. JavaScript: from Zero to Hero
* ,;7~((\))`;;,, <zerotoherojs.com>
* ,(@') ;)`))\;;', an extraordinary course to learn JavaScript
* ) . ),(( ))\;, and related technologies
* /;`,,/7),)) )) )\,,
* (& )` (,((,((;( ))\,
*
@v0lkan
v0lkan / gist:e181067a94ba87d66b6708c358f2c892
Created Jan 17, 2019
work-it-do-it-makes-us-stronger.js
View gist:e181067a94ba87d66b6708c358f2c892
const workIt = () => "work it";
const makeIt = () => "make it";
const doIt = () => "do it";
const makesUs = () => "makes us";
function* stepper() {
yield "harder";
yield "better";
yield "faster";
yield "stronger";
@v0lkan
v0lkan / pronounce.txt
Last active Aug 9, 2019
pronounciation notes
View pronounce.txt
English Study:
th sound:
think about this thing that thing and those things
View paste
latentflip.com/loupe/?code=c3R1ZmYgPSBbJ2xvcmVtJywgJ2lwc3VtJywgJ2RvbGFyJywgJ3NpdCcsICdhaG1ldCddOwoKCm5ld1N0dWZmID0gc3R1ZmYubWFwKCh3aGF0KSA9PiB7CiAgIHJldHVybiB3aGF0ICsgJyAnICsgJ015IG1hbiEnOyAKfSk7Cgpjb25zb2xlLmxvZyhuZXdTdHVmZik7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D
@v0lkan
v0lkan / zerotoherojs.com-outline.js
Last active Jul 10, 2018
“JavaScript: from Zero to Hero” Course Outline
View zerotoherojs.com-outline.js
/*
*
*/
(function closure() {
const courseOutline = [
{
title: 'Introduction',
lessons: [
{ title: 'About “JavaScript: from Zero to Hero”' },
@v0lkan
v0lkan / ifaces.js
Last active Mar 18, 2019
Returns the non-local network IPv4 interaces on the machine as an Array
View ifaces.js
const os = require('os');
// for lo-dashers:
// _(os.networkInterfaces()).values().flatten().where({ family: 'IPv4', internal: false }).pluck('address');
// should give a similar output.
//
// or for burrito-lovers:
// pluck(query(flatten(values(os.networkInterfaces())))({family: 'IPv4', internal: false}))('address');
//
// or for ramda-lovers:
@v0lkan
v0lkan / rafraf.js
Last active May 5, 2018
Double requestAnimatioFrame FTW!
View rafraf.js
const rafraf = (callback) => {
if (!window.requestAnimationFrame) {return null;}
return window.requestAnimationFrame(() =>
window.requestAnimationFrame(callback)
);
};
@v0lkan
v0lkan / switching-reducer.js
Last active Mar 2, 2018
Switching Reducer
View switching-reducer.js
// I find myself using this utility function frequently.
// I don’t know if this pattern has a name, yet I’d like
// to call it the “switching reducer”.
// Here’s how you define it:
// ########################
// The Library
// ########################
@v0lkan
v0lkan / evolution-of-a-fetch.js
Last active Feb 26, 2018
The Evolution of a Fetch
View evolution-of-a-fetch.js
// Assume `dispatch` and `fetchFromNetwork` are defined elsewhere.
// ## 1. CPS With Nodebacks
// This is the old-school-style fetch. Mostly here for
// historical reasons.
//
// Yet, contrary to the arguments against using it,
// it‘s not that hard to maintain this code when you are
// careful and know what you are doing.
@v0lkan
v0lkan / evolution-of-a-fetch.js
Created Feb 23, 2018
The evolution of a moderately-complicated fetch request
View evolution-of-a-fetch.js
// Assume `fetch` and `notify` are defined elsewhere.
// ## 1. CPS With Nodebacks
function fetchAppState() {
return function(dispatch) {
fetch(function(err, data) {
if (err) {
console.error('Poop', err);
return;
You can’t perform that action at this time.