Skip to content

Instantly share code, notes, and snippets.

View elonsalfati's full-sized avatar
🦅
Always working on something new

Elon Salfati elonsalfati

🦅
Always working on something new
View GitHub Profile
@elonsalfati
elonsalfati / main.go
Created July 12, 2019 07:54
grpc/rest main server
package main
import (
"fmt"
"os"
cmd "github.com/ElonSalfati/events-manager/pkg/cmd/server"
)
func main() {
@elonsalfati
elonsalfati / server.go
Created July 12, 2019 07:53
cmd/server
package cmd
import (
"context"
"flag"
"log"
"os"
firebase "firebase.google.com/go"
grpc "github.com/ElonSalfati/events-manager/pkg/protocol/grpc"
@elonsalfati
elonsalfati / server.go
Created July 12, 2019 07:53
REST server
package rest
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
@elonsalfati
elonsalfati / server.go
Created July 12, 2019 07:52
gRPC server
package grpc
import (
"context"
"log"
"net"
"os"
"os/signal"
v1 "github.com/ElonSalfati/events-manager/pkg/api/v1"
@elonsalfati
elonsalfati / events-service.go
Created July 7, 2019 17:51
events manager firestore service
package v1
import (
"context"
"log"
"cloud.google.com/go/firestore"
firebase "firebase.google.com/go"
v1 "github.com/ElonSalfati/events-manager/pkg/api/v1"
@elonsalfati
elonsalfati / events-service.proto
Last active July 7, 2019 09:11
medium-tutorial-events-manager-proto
// Set the syntax to proto3
syntax = "proto3";
// Set the generated files to be under package v1
package v1;
// import definitions from protobuf
import "google/protobuf/timestamp.proto";
// import swagger generator
@elonsalfati
elonsalfati / sketch-never-ending.md
Created June 26, 2019 04:57 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@elonsalfati
elonsalfati / gist:c3c9c5f851b8f94829eb32bd22ff9b01
Created June 22, 2019 06:46 — forked from pglombardo/gist:7630100
How to open your private Github repository and still keep a couple things under wrap

We're happy to say that we recently released the code for the TraceView Ruby instrumentation on Github as Open Source. There are a ton of benefits for AppNeta (and the community) in doing this so making the decision was easy... but the process of actually opening the repository and still keeping a few things private was slightly trickier. Here's the route we took that has worked out really well.

The Situation and Strategy

The Ruby instrumentation has always been sheltered on Github - albeit always in a private Github repository. We used the issues, pull requests and wiki pages extensively for everything from new employee resources to hosting screenshots, customer issues, internal discussions and links to other project and management tools (e.g. Asana).

Outside of the commits and the code, everything else was either of little use to the public or potentially company or customer confidential - stuff that shouldn't or couldn't be shared publicly. So this put us

@elonsalfati
elonsalfati / aggregate-cidr-addresses.pl
Created February 6, 2019 10:06 — forked from denji/README.md
Take a list of CIDR address blocks and combine them, for example, 192.168.0.0/24 and 192.168.1.0/24 gives 192.168.0.0/23. I usually use "list-iana-reserved-ranges | aggregate-cidr-addresses" to get a list of blocks to not report with firewall log processing. [ https://github.com/job/aggregate6 | https://github.com/flowchartsman/cidr-convert ]
#!/usr/bin/perl
#
# aggregate-cidr-addresses - combine a list of CIDR address blocks
# Copyright (C) 2001,2007 Mark Suter <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#