Skip to content

Instantly share code, notes, and snippets.

View subfuzion's full-sized avatar

Tony Pujals subfuzion

View GitHub Profile
@subfuzion
subfuzion / sprint-2017.md
Last active July 19, 2017 18:16
AMP Sprint Summaries 2017
We couldn’t find that file to show.
@subfuzion
subfuzion / README.md
Created May 7, 2017 23:42
Upgrade Ubuntu release
$ sudo apt-get update && sudo apt-get upgrade -yf && sudo apt-get dist-upgrade -yf
$ sudo apt-get install -yf update-manager-core
$ sudo do-release-upgrade
@subfuzion
subfuzion / install-docker-ubuntu.md
Last active September 26, 2023 08:20
Installing Docker on Ubuntu

Installing with apt-get

#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep docker@docker.com || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
@subfuzion
subfuzion / README.md
Last active May 11, 2024 17:03
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,

@subfuzion
subfuzion / go-topics.md
Created September 21, 2016 16:20
Go topics

Go source, packages and working with tools

  • go test
  • go run
  • go build
  • go install

Vendoring

@subfuzion
subfuzion / empty-example.md
Last active February 26, 2024 20:39
Protocol Buffer example of importing and using empty

How to import and indicate empty request or reply messages:

import "google/protobuf/empty.proto";

service SomeService {
    rpc SomeOperation (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
@subfuzion
subfuzion / README.md
Last active December 9, 2017 15:59
Bootstrapping a local Docker 1.12 swarm with multiple virtualbox machines

Overview

It's easy enough to set up your machine as a swarm manager for local development on a single node swarm. But how about setting up multiple local nodes using Docker Machine in case you want to simulate a multiple node environment (maybe to test HA features)?

The following script demonstrates a simple way to specify the number of manager and worker nodes you want and then bootstrap a swarm.

You can also check out the sample as a Github project here.

@subfuzion
subfuzion / Makefile.md
Last active October 18, 2023 14:49
Makefile for Go projects

Go has excellent build tools that mitigate the need for using make. For example, go install won't update the target unless it's older than the source files.

However, a Makefile can be convenient for wrapping Go commands with specific build targets that simplify usage on the command line. Since most of the targets are "phony", it's up to you to weigh the pros and cons of having a dependency on make versus using a shell script. For the simplicity of being able to specify targets that can be chained and can take advantage of make's chained targets,

@subfuzion
subfuzion / golang-tls.md
Created July 15, 2016 01:54 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@subfuzion
subfuzion / node-assessement.md
Last active March 19, 2021 10:03
Node.js Assessment

A few questions for quickly assessing candidate's Node.js skill level

  1. Write a function that simulates an asynchronous I/O function call. The function should be called ping. It should accept one argument called delay that will determine how many seconds before the function will call back with a response (pong). If no argument is provided, it should call back immediately. If the argument is greater than 3, it should call back with an error.
function ping(delay, callback) {
 // if delay is not provided, it should default to 0
 if (typeof delay === 'function') {
   callback = delay;
   delay = 0;