Skip to content

Instantly share code, notes, and snippets.

View josecolella's full-sized avatar
💻
Building a compliance platform at Gusto

Jose Miguel Colella josecolella

💻
Building a compliance platform at Gusto
View GitHub Profile
@josecolella
josecolella / README
Created August 3, 2023 05:12
Updating the allow_update_branch setting for a repository
# Updating the setting to update branches when there is a build incident
## Initial rollout
### Why?
A very common thing that happens at Gusto is a build incident due to some flakiness or intermittent database network issue.
A developers first instinct is to update to main to see if the issue has been resolved. Many times this results in merging to
import * as path from 'path';
import * as express from 'express';
import * as logger from 'morgan';
import * as bodyParser from 'body-parser';
const app = express();
@josecolella
josecolella / gist:3a58765a156eec71c8705f1f6aca342b
Created November 28, 2017 21:15 — forked from jsumners/gist:e6b5d0a699f16ba980a3
Introduction to Sequelize Migrations

What are Migrations

Just like how we use Git to version control source code, we use migrations to manage the state of our database schemas.

I'm not really sure what that means...

Imagine you're working on project with another developer, and you're both tasked with creating a specific part of an event planning application. Let's say you are in charge of creating the Users and your friend is going to create the Events.

Let's say you and your friend divided the work in a way so that neither of you will have to to use each other's code to finish your tasks. While you're working on your part of the application, you only really need to touch the Users table when you are working with the database.

Creating models and migrations

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Id;Name;Site Type;Region;Area;UDL;WAN;Link Speed In;Link Speed Out;Comment;Domains
;GA_0853;Manual;AGENZIA;SENORBI';false;false;;;;192.168.99.97-192.168.99.126
;GA_0204;Manual;AGENZIA;MILANO PORTA TICINESE;false;false;;;;192.168.99.65-192.168.99.94
;GA_0854;Manual;AGENZIA;SEGRATE;false;false;;;;192.168.99.225-192.168.99.254
;GA_0429;Manual;AGENZIA;FIUMICINO;false;false;;;;192.168.99.193-192.168.99.222
;GA_999A;Manual;AGENZIA;AGENZIA DI TEST DIREZIONE;false;false;;;;192.168.99.161-192.168.99.190
;GA_0249;Manual;AGENZIA;PATERNO';false;false;;;;192.168.99.1-192.168.99.30
;GA_0478;Manual;AGENZIA;SAN GIOVANNI IN PERSICETO;false;false;;;;192.168.98.97-192.168.98.126
;GA_0423;Manual;AGENZIA;CESANO MADERNO;false;false;;;;192.168.98.65-192.168.98.94
;GA_0426;Manual;AGENZIA;COLLECCHIO;false;false;;;;192.168.98.33-192.168.98.62
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
Codice,Tipologia,Nome,Indirizzo,Telefono,Cellulare,TGU Principale,TGU Secondaria,LoopBack Principale,LoopBack Secondaria,Network,Subnet Mask,IP HSRP,IP SWITCH,Router Principale,Router Secondario,Note
WIFIPAVESE,SEDEROMA,WiFi Pavese,Via Cesare Pavese 385,,,10-0613909286,,,,31.195.2.56/248/255.255.255.24,255.255.255.24,,,,,Questo impianto permette il collegamento WIFI di tutto lo stabile Per aprire un Ticket a Telecom per guasto sull???impianto ADSL 7M F7 Mbpscon BMG 1024 kbps 512 kbps di viale Cesare Pavese 385 telefonare al N?? 800018914 digitare il 1 - 1 . Il telefono assegnato alla WiFi ?? il 0613909286. Il Router ?? di tipo THOMSON Informazioni utili: TGU 10- 0613909286 P2P 85.39.2.120 / 252 LAN 31.195.2.56/248 PC 31.195.2.58(WiFi) - 62 Gateway 255.255.255.24
GA_0836,AGENZIA,BOLOGNA SABATINI,"CORSO LORENZO SABATINI, 3",5119980051,FAILLACE LUCA 3299822408,,,,,192.168.129.0/255.255.255.224,255.255.255.224,192168.129.30,,192168.129.29,192168.129.28,BERTOLDI ROBERTO 3488502259
GA_0853,AGENZIA,SENORBI',"VIA CAR
@josecolella
josecolella / pre-render.js
Created July 9, 2017 21:42 — forked from mef/pre-render.js
proof-of-concept pre-rendering d3.js svgs on the server using node.js and jsdom module.
// pre-render d3 charts at server side
var d3 = require('d3')
, jsdom = require('jsdom')
, fs = require('fs')
, htmlStub = '<html><head></head><body><div id="dataviz-container"></div><script src="js/d3.v3.min.js"></script></body></html>'
jsdom.env({
features : { QuerySelector : true }
, html : htmlStub
, done : function(errors, window) {
@josecolella
josecolella / gist:aafc9bc4b9a27cbfcf7b28dbe48e2477
Created April 7, 2017 11:48
RHEL 6.x and 7.x network bonding
makebond() {
BOND=$1
SLAVE1=$2
SLAVE2=$3
IPADDRESS=$4
NETMASK=$5
GATEWAY=$6
_HOSTNAME=$(hostname)
@josecolella
josecolella / solution.py
Created February 17, 2017 09:42
Permutation Problem
#!/usr/bin/env python
def solution(N, S):
reserved_seats = S.split(" ")
seatMarkers= ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K']
count = 0
formatted = []
seats = []
# Creation of list of seats
for row in range(N):
@josecolella
josecolella / Prefereces.sublime-settings
Created February 2, 2017 20:02
Sublime Text 3 User Preferences
{
"always_show_minimap_viewport": true,
"auto_complete_triggers":
[
{
"characters": ".",
"selector": "source.python"
}
],
"bold_folder_labels": true,
@josecolella
josecolella / amdrhel6.cfg
Last active November 12, 2015 10:53
amdrhel6.cfg
#########################################################################
# $Revision: 1.1 $
# $Author: build $
#########################################################################
#Kickstart for instalation Compuware AMD probe on RHEL6.x
#ATTENTION!: you MUST use "UNIX STYLE" LINE ENDS in this file
# for installation from network: