Skip to content

Instantly share code, notes, and snippets.

@santiaago
santiaago / file1.txt
Last active January 2, 2021 07:47
Python script to insert lines in multiple files following a pattern
a > b
a = foo(c)
b = 2
b = foo(b)
foo
bar
foobar
b = foo(v)
@santiaago
santiaago / Program.cs
Created August 13, 2018 11:05
Simple C# NATS example
using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NATS.Client;
namespace worker
{
class Program
{
@santiaago
santiaago / sortByDate.go
Last active November 23, 2022 18:43
Sorting an array of dates in Go
package main
import "fmt"
import "time"
import "sort"
func main() {
fmt.Println("Sorting an array of time")
const shortForm = "Jan/02/2006"
t1, _ := time.Parse(shortForm, "Feb/02/2014")
@santiaago
santiaago / main.go
Last active March 18, 2023 07:57
Playing with images
package main
import (
"bytes"
"encoding/base64"
"flag"
"html/template"
"image"
"image/color"
"image/draw"
@santiaago
santiaago / cache.go
Last active June 24, 2023 18:24
Learning HTTP caching in Go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/jpeg"
"log"