Skip to content

Instantly share code, notes, and snippets.

View odykyi's full-sized avatar
🍍
(async () => { /* ...loading */ })();

odykyi

🍍
(async () => { /* ...loading */ })();
View GitHub Profile
@odykyi
odykyi / GraphQL vs Firebase.MD
Created January 5, 2018 16:14
GraphQL vs Firebase.MD

GraphQL vs Firebase

With the variety of server-side technologies today, developers have a lot of choices when it comes to deciding what kind of backend to use for their next application.

In this article, we want to explore the differences between GraphQL and Firebase, two very popular server-side technologies.

Overview

Before diving into technical details, let's create some perspective on the two technologies and where they're coming from.

@odykyi
odykyi / git remote set url.sh
Last active February 23, 2018 09:54
git remote set url.sh
git remote set url.sh
0. git remote -v
1.1 git remote add origin [email protected]:USERNAME/REPOSITORY.git
1.2 git remote add origin https://github.com/USERNAME/REPOSITORY.git
2.1 git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
2.2 git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
@odykyi
odykyi / .eslintrc
Created December 1, 2017 14:42 — forked from radiovisual/.eslintrc
React Native AirBnB ESLint Config
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
@odykyi
odykyi / SignInWithTwitter.js
Created October 5, 2017 14:10 — forked from rhussmann/SignInWithTwitter.js
Simple 'sign in with Twitter' implementation in node.js
var http = require('http'),
sys = require('sys'),
URL = require('url'),
querystring = require('querystring'),
OAuth = require('oauth').OAuth;
var oa = new OAuth('https://api.twitter.com/oauth/request_token',
'https://api.twitter.com/oauth/access_token',
'YOUR APP CONSUMER KEY HERE',
'YOUR APP CONSUMER SECRET HERE',
@odykyi
odykyi / a.js
Created September 26, 2017 14:53
a.js
const promise = require('bluebird'); // or any other Promise/A+ compatible library;
const options = {
promiseLib: promise // overriding the default (ES6 Promise);
};
const pgp = require('pg-promise')(options);
const cn = {
host: 'localhost', // 'localhost' is the default;
@odykyi
odykyi / lodash-js-pagination-page-skip-sort-order-limit.js
Created September 26, 2017 08:59
lodash-js-pagination-page-skip-sort-order-limit.js
/* PAGINATION WITH SORTING AND PAGING */
const page = 1; // input page, min value 1
const limit = 2; // input limit min value 1
/* INPUT ARRAY */
const array = [
{ Editable: true, Name: "Daniel Test", Site: "SE100"},
{ Editable: true, Name: "Test new", Site: "SE100"},
{ Editable: false, Name: "Test", Site: "SE100"},
];
@odykyi
odykyi / index.js
Created September 19, 2017 10:12
index.js
},
function lala() {
console.log('blabla')
@odykyi
odykyi / isRequired.js
Last active May 7, 2017 14:48
isRequired.js
const isRequired = () => { throw new Error('param is required'); };
const hello = (name = isRequired()) => { console.log(`hello ${name}`) }