Skip to content

Instantly share code, notes, and snippets.


Brian Boyko brianboyko

View GitHub Profile
brianboyko / urlUuid.js
Created Mar 8, 2018
Encode and decode UUIDs into URL-safe Base 64
View urlUuid.js
// converts a UUID to a URL-safe version of base 64.
const encode = uuid => {
const stripped = uuid.replace(/-/g, ""); // remove dashes from uuid
const true64 = btoa(
.replace(/\r|\n/g, "")
.replace(/([\da-fA-F]{2}) ?/g, "0x$1 ")
.replace(/ +$/, "")
View gist:3b7f517d35610628036367c17336dfe3
import neo4j, { Driver, Session } from "neo4j-driver";
import config from "../config";
const neoDriver: Driver = neo4j.driver(
neo4j.auth.basic(config.neo.login, config.neo.password),
{ useNativeNumbers: true }
export const neo = (): Session => neoDriver.session();
brianboyko / looksay.js
Created Jan 24, 2018
Would you like to build a function?
View looksay.js
// Hey Anna, wanna write a function that returns the output for a look and say sequence:
function lookAndSaySequence(n) {
// would you like to build a function?
// a function that returns a striiiing.
var lookSay = function(strNum) {
var sayArray = [];
var repeats = 1; // we check to see how many nums
var digit = 0; // and say the num
View normalizedCodes.json
This file has been truncated, but you can view the full file.
"10001": {
"zip": "10001",
"city": "New York",
"state": "New York",
"state_abbr": "NY",
"county": "New York",
"lat": 40.7484,
"lng": -73.9967
View zipCodes.csv
We can't make this file beautiful and searchable because it's too large.
00501,Holtsville,New York,NY,Suffolk,40.8154,-73.0451
00544,Holtsville,New York,NY,Suffolk,40.8154,-73.0451
brianboyko /
Last active Sep 24, 2020
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

brianboyko / functional.js
Last active Oct 19, 2017
Functional Tools
View functional.js
// Takes a function and additional arguments to be applied, and returns
// a new function with those provided arguments already partially applied.
export const curry = (f, ...curriedArgs) => (...newArgs) =>
f.apply(null, curriedArgs.concat(newArgs));
// Allows to iterate functions over a variable.
export const Identity = value => ({
map: f => Identity(f(value))
View gist:bb192784d6afb6e63d6f4c2c4e2b90f8
-- Read more about this program in the official Elm guide:
import Html exposing (..)
import Html.Attributes exposing(src)
import Html.Events exposing (..)
import String exposing (repeat)
import Random
main =
View reduxify.js
// While I started the original Reduxify project on NPM, my repo partner, Johnathan Sun, improved on it.
// However, I still like incorporating my original into my own projects, and so I'm making this Gist for my
// own reference.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
const pick = (state, list) => list.reduce((pv, cv) => {
pv[curr] = state[curr];
return pv;
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
You can’t perform that action at this time.