Skip to content

Instantly share code, notes, and snippets.

santiaago santiaago

Block or report user

Report or block santiaago

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@santiaago
santiaago / Program.cs
Created Aug 13, 2018
Simple C# NATS example
View Program.cs
using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NATS.Client;
namespace worker
{
class Program
{
View hello.package.json
"contributes": {
"commands": [
{
"command": "extension.sayHello",
"title": "Hello World"
}
]
},
@santiaago
santiaago / main.go
Created Feb 10, 2015
Testing HTTP caching in Go
View main.go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/jpeg"
"log"
@santiaago
santiaago / cache.go
Last active Feb 13, 2018
Learning HTTP caching in Go
View cache.go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/jpeg"
"log"
@santiaago
santiaago / chessboard.go
Created Jan 11, 2015
Building a chessboard image in go
View chessboard.go
package main
import (
"image"
"image/color"
"image/jpeg"
"log"
"os"
)
View driftme.ps1
param([String]$server="yourservername",
[String]$sqlServerVersion="sql2014",
[String]$dbToDrift="yourdbtodrift",
[String]$tableToDrift="yourtabletodrift")
$previousLocation = Get-Location
Import-Module "sqlps" -DisableNameChecking
SQLSERVER:
$directory = "\sql\{0}\{1}\databases\{2}" -f $server, $sqlServerVersion, $dbToDrift
@santiaago
santiaago / main.go
Last active Mar 13, 2019
Playing with images
View main.go
package main
import (
"bytes"
"encoding/base64"
"flag"
"html/template"
"image"
"image/color"
"image/draw"
View barchart.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Bar Chart with Negative Values</title>
<style>
.bar.positive {
fill: #B9E397;
}
.bar.negative {
View pieChartData.csv
sentiment population
positive 50
negative 20
neutral 30
@santiaago
santiaago / randInInterval.go
Last active Aug 27, 2017
Random number in a given interval
View randInInterval.go
// computes a random number in the specified interval centered in zero.
func randInInterval(min int, max int) float64 {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
size := float64(max - min)
return r.Float64()*size + float64(min)
}
You can’t perform that action at this time.