Skip to content

Instantly share code, notes, and snippets.

View avegancafe's full-sized avatar

Kyle Holzinger avegancafe

View GitHub Profile
@avegancafe
avegancafe / remove-old-postgres.sh
Created July 19, 2019 17:34
A script to remove any old postgres version.
# After this, you should be free to install any new version without fear of having old data files
#
# Writing this because `brew postgresql-upgrade-database` will sometimes read the wrong version of postgres if
# you have had multiple previous versions of postgres
brew uninstall postgres
brew uninstall postgres@<insert version here>
rm -rf /usr/local/var/postgres
rm -rf /usr/local/var/postgres@<insert version here>

React Migration Strategy

After 5 years of developing our application, VTS decided to move on from AngularJS and migrate to ReactJS for our UI layer. After countless complex features, UI interactions, and developer tools created in AngularJS, although we are sad to see it go, we have decided that the Angular ecosystem is no longer right for us. If you want to see more about what went into that decision, feel free to check out [this blog post](TODO: insert link here)! There I into detail about why we felt AngularJS wouldn't fit our needs going forwards.

@avegancafe
avegancafe / Default (OSX).sublime-keymap
Last active November 16, 2018 14:17
Sublime Settings
[
{ "keys": ["super+shift+c"], "command": "copy_path" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+]"], "command": "goto_definition" },
{ "keys": ["ctrl+t"], "command": "jump_back" },
{ "keys": [" "], "command": "insert_snippet", "args": {"contents":" $0 "}, "context": [
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "[\\(\\{\\[]$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[\\)\\}\\]]", "match_all": true }

React Code Style Guide

This is our style guide for how we write our react code at VTS. Some of them are preferences, but if we all try to stick to them as much as possible hopefully we can have a maintainable, easy to read codebase. If something is not listed here, then we generally abide by the AirBnB's react style guide. If it's not in there either, use your best judgement.

Table of Contents

  1. Syntax
#! /usr/local/bin/node
const p = parseInt(process.argv[2])
const n = parseInt(process.argv[3])
const d = parseInt(process.argv[4])
const t = p + n + d
const nps = p / t - d / t
anthony = User.find_by_email('anthony.levy@viewthespace.com')
admin_role = UserSecurityRole.find_by_code('ADMIN')
anthony.update!(security_role: admin_role)
@avegancafe
avegancafe / n.md
Last active April 17, 2018 17:38
Switching from nvm to n

How to switch from nvm to n

# 1.
# remove nvm script
rm -rf ~/.nvm

# 2.
# Remove any references to nvm in your ~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish or whatever your config file is

React NYC 11/9/2017

reactNYC youtube channel: youtube.com/reactNYC Slack Channel: nycjs.org.now.sh

Converting an application from angular 1.5 to react 16

Overview

  • It took 1 quarter
  • 15 engineers, 100+ employees (a little smaller than VTS)
<html>
<head>
<style>
.container {
max-height: 0;
transition: max-height 200ms ease;
overflow: hidden;
}
OASISFormat: 0.4
Name: api
Version: 0.0.1
Authors: Kyle Holzinger
License: MIT
Executable "main"
Path: src/
BuildTools: ocamlbuild
MainIs: main.ml