Skip to content

Instantly share code, notes, and snippets.

They didn't escape Denver zoo.

Keybase proof

I hereby claim:

  • I am roxtar on github.
  • I am roxtar (https://keybase.io/roxtar) on keybase.
  • I have a public key whose fingerprint is A9F2 811F 52C0 0CEF 5219 5C8F E160 2A7B 8D68 DA61

To claim this, I am signing this object:

@roxtar
roxtar / main.go
Created February 18, 2016 16:45
Simple application to test the Metron Doppler TCP link
package main
import (
"encoding/binary"
"fmt"
"net"
"os"
"github.com/cloudfoundry/sonde-go/events"
"github.com/gogo/protobuf/proto"
package main
import (
"crypto/tls"
"encoding/gob"
"flag"
"fmt"
"github.com/cloudfoundry/dropsonde/emitter"
"github.com/cloudfoundry/dropsonde/factories"
"github.com/cloudfoundry/sonde-go/events"
@roxtar
roxtar / hardcoded.txt
Created September 18, 2015 16:59
Hardcoded metron port
github.com/cloudfoundry-incubator/auctioneer/cmd/auctioneer/main.go:
84: dropsondeDestination = "localhost:3457"
github.com/cloudfoundry-incubator/converger/cmd/converger/main.go:
82: dropsondeDestination = "localhost:3457"
github.com/cloudfoundry-incubator/diego-ssh/cmd/ssh-proxy/main.go:
68: dropsondeDestination = "localhost:3457"
@roxtar
roxtar / buffer_size.c
Created July 10, 2015 16:58
C program to print the TCP send and receive buffer sizes
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
int main() {
int n;
unsigned int m = sizeof(n);
int fdsocket = socket(AF_INET, SOCK_STREAM, 0);
getsockopt(fdsocket,SOL_SOCKET,SO_SNDBUF,(void *)&n, &m);
printf("Send buffer: %d\n", n);
getsockopt(fdsocket,SOL_SOCKET,SO_RCVBUF,(void *)&n, &m);
@roxtar
roxtar / sleep_sort.go
Created June 16, 2011 06:10
Sleep Sort in Go
// inspired by http://dis.4chan.org/read/prog/1295544154
package main
import ("flag"
"time"
"fmt"
"strconv"
"sync"
)
func main() {
@roxtar
roxtar / select_chans.go
Created June 4, 2011 05:07
Select on Arrays of Channels
// Go program which demonstrates how "select" can be used
// to receive from an array of channels.
// Rohit Kumar
// June 3, 2011
package main
import (
"fmt"
"runtime"
)
func main() {
@roxtar
roxtar / mapreduce.py
Created March 15, 2011 08:16
Map Reduce
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.