Skip to content

Instantly share code, notes, and snippets.

Nicolás Hock-Isaza nhocki

Block or report user

Report or block nhocki

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
View rate_limiter.go
package main
import (
"log"
"os"
"os/signal"
"syscall"
"time"
"foo/bar/splice/ratelimiter"
@nhocki
nhocki / multi-arch.sh
Last active Apr 3, 2018
Modified https://github.com/stickermule/rump to use KEYS against an older Redis installation.
View multi-arch.sh
#!/usr/bin/env bash
VERSION="$1"
rm rump-*
GOOS=darwin GOARCH=amd64 go build -o rump-$VERSION-darwin-amd64 rump.go
GOOS=linux GOARCH=amd64 go build -o rump-$VERSION-linux-amd64 rump.go
GOOS=linux GOARCH=arm go build -o rump-$VERSION-linux-arm rump.go
GOOS=windows GOARCH=amd64 go build -o rump-$VERSION-windows-amd64 rump.go
@nhocki
nhocki / main.go
Created Oct 18, 2017
UUID generation tool
View main.go
package main
import (
"fmt"
"github.com/mattetti/uuid"
)
func main() {
fmt.Println(uuid.GenUUID())
@nhocki
nhocki / settings.json
Created May 10, 2017
vscode settings
View settings.json
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Inconsolata, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 16,
"editor.rulers": [ 80 ],
"editor.tabSize": 2,
"workbench.statusBar.visible": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.osx": "/bin/zsh",
"go.gopath": "/Users/tarjan/go",
View foo.sh
#!/usr/bin/env bash
CMD=${1:-false}
URL=${2:-example.com}
if [ $CMD = false ]; then
echo "usage: " $0 "command [url:example.com]"
exit 1
fi
View sitemap.rb
require 'rubygems'
require 'pry'
$nodes = Hash.new
class Index
attr_reader :children, :name
attr_accessor :parent
def initialize(size, name, children = Array.new)
View keybase.md

Keybase proof

I hereby claim:

  • I am nhocki on github.
  • I am nhocki (https://keybase.io/nhocki) on keybase.
  • I have a public key ASAapzaRg-je5LhP7oDwNcUwVtbKVeEBCsezA2gZUQL60Ao

To claim this, I am signing this object:

@nhocki
nhocki / bitly.coffee
Created Oct 22, 2016
Bitly library for Hubot
View bitly.coffee
# Bit.ly shortener
#
# Configuration:
# HUBOT_BITLY_ACCESS_TOKEN
module.exports = (robot) ->
shorten: (url, callback) ->
robot.http("https://api-ssl.bitly.com/v3/shorten")
.query
access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN
format: "json"
View gist:37a35280cc0ce4737a74ce51f249fd4b
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
@nhocki
nhocki / introrx.md
Created May 9, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.