Skip to content

Instantly share code, notes, and snippets.

View jsilva's full-sized avatar

Joao Da Silva jsilva

View GitHub Profile
@jsilva
jsilva / managed_notebook_runtime_500_bug.py
Created June 21, 2022 20:09
Vertex AI Managed Notebook 500 error when setting network and subnetwork
from google.cloud import notebooks_v1
from google.cloud.notebooks_v1.types import (
ContainerImage,
CreateInstanceRequest,
CreateRuntimeRequest,
Instance,
LocalDisk,
LocalDiskInitializeParams,
Runtime,
RuntimeAcceleratorConfig,

Greasing the Skids: Building Remote Teams

In the wake of the virus that-must-not-be-named (which most people misname anyway), it seems like everyone and their cat has posted some sort of opinion or how-to on making remote work, work. This is a good thing! Working remotely, particularly full-time, is hard! I've done it for my entire career (aside from an odd 14 month office period in the middle that we shall not speak of), but more relevantly, for the past two years I've been responsible for building, managing, and enabling an entirely remote team, distributed across nine timezones. Remote teams don't just happen by installing Slack and telling everyone to work on their couch: they require a lot of effort to do correctly and efficiently. But, done right, it can be a massive multiplier on your team efficiency and flexibility.

Here's how we do it. I'm going to attempt to structure this post more towards management than engineering, and so I apologize in advance if I assume terminology or knowledge which

@jsilva
jsilva / rpc.md
Created September 15, 2019 13:24 — forked from creationix/rpc.md
Simple RPC design

I've designed a lot of RPC protocols in my career. One pattern that's worked well basically goes as follows:

// Client calls: print('Hello World\n')
-> [1, "print", "Hello World!\n"]
// Server sends return value (or lack of return vvalue)
<- [-1]

// Client calls: add(1, 2)
-> [2, "add", 1, 2]
trait Subscriber[A] {
def send(message: A)
}
def dispatch(message: T) = F.start(subscriber.send(message)
def chunkProcessor(messages: Chunk[CommittableMessage[F, K, V]]): F[Chunk[CommittableOffset[F]]] =
messages.map { message =>
deserializer(message).flatMap {
case Some(m) => dispatch(m) >> F.delay(message.committableOffset)
@jsilva
jsilva / about.md
Created May 14, 2016 05:35 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@jsilva
jsilva / springer-free-maths-books.md
Created December 29, 2015 08:48 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca

// The "classic" Repository interface
trait BoatRepository {
def find(uid: String): Future[Boat]
}
@jsilva
jsilva / deploy.sh
Last active December 11, 2015 07:08
#!/bin/bash -e
if [ -f /etc/cron.d/initialrunner ]; then
rm /etc/cron.d/initialrunner
fi
echo "10.181.8.179 salt salt.fffflash.com" >> /etc/hosts
mkdir -p /srv/src && cd /srv/src && wget -O - http://bootstrap.saltstack.org | sudo sh
reboot
@jsilva
jsilva / Shell
Last active December 11, 2015 02:09
# to install the latest stable version:
brew install play
# to install play-2.1-RC1:
brew install https://raw.github.com/gist/4528959/play.rb
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch play 2.0.4
brew switch play 2.1-RC1