Skip to content

Instantly share code, notes, and snippets.

@isotopeee
isotopeee / createSchemaRecursive.js
Last active July 23, 2020 04:12
Create schema recursion
function createSchema(obj) {
return Object.entries(obj).reduce(recurse, {});
}
function recurse(prev, [currentKey, currentValue]) {
let valType;
switch (typeof currentValue) {
case 'string':
valType = 'string';
@isotopeee
isotopeee / sample-bitbucket-ssh-config
Last active April 17, 2019 00:34
A sample ssh config to automatically add ssh keys to ssh agent on mac
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
# 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 ->