Skip to content

Instantly share code, notes, and snippets.

View gouthamve's full-sized avatar
🏠
Working from home

Goutham Veeramachaneni gouthamve

🏠
Working from home
View GitHub Profile
@gouthamve
gouthamve / index.js
Last active August 29, 2015 14:21
Script to create 100 folders with files inside them
var fs = require('fs')
var create = function(i) {
fs.mkdir('folder'+i, 0700, function(err) {
if(err)
console.log(err)
fs.open('folder'+i+'/file'+i, 'w', 0700, function(err, fd) {
fs.close(fd);
})
})
---------- Forwarded message ----------
From: Arun Prakash <arunprakash.pts@gmail.com>
Date: Wed, May 20, 2015 at 11:08 AM
Subject: [Mozilla India] Fwd: [FSFTN] FSFTN Summer Camp on Free Software Technologies at IIT Madras - June 8 to June 13
To: "mozilla-dev-l10n-ta@lists.mozilla.org" <mozilla-dev-l10n-ta@lists.mozilla.org>, community-india@lists.mozilla.org
FYI.
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
@gouthamve
gouthamve / test.hs
Last active January 17, 2016 06:36
Why does this happen?
-- Doesnt Work
module Foo where
sumTutorial :: Integer -> Integer
sumTutorial 0 = 0
sumTutorial n = n + sumTutorial n-1
module Foo where
sumTutorial :: Integer -> Integer
@gouthamve
gouthamve / get.go
Last active February 22, 2016 18:25
A simple GET request in GoLang
package main
import (
"bufio"
"fmt"
"log"
"net"
)
func main() {
@gouthamve
gouthamve / config.toml
Last active January 4, 2017 13:06
Single node Influx config
### Welcome to the InfluxDB configuration file.
# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
# The data includes raft id (random 8 bytes), os, arch, version, and metadata.
# We don't track ip addresses of servers reporting. This is only used
# to track the number of instances running and the versions, which
# is very helpful for us.
# Change this option to true to disable reporting.
reporting-disabled = false
@gouthamve
gouthamve / telegraf.conf
Created February 27, 2016 18:30
Telegraf config
# Telegraf Configuration
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.

Keybase proof

I hereby claim:

  • I am gouthamve on github.
  • I am gouthamve (https://keybase.io/gouthamve) on keybase.
  • I have a public key whose fingerprint is 8B43 438C 7BC4 41DD 39CE 62D1 F1C2 17E8 E902 3CAD

To claim this, I am signing this object:

@gouthamve
gouthamve / goroutine?debug=2
Last active April 17, 2017 18:40
Prometheus stuck while exiting
goroutine 32042 [running]:
runtime/pprof.writeGoroutineStacks(0x269b340, 0xc4203440e0, 0x30, 0xc420ada3c0)
/usr/local/go/src/runtime/pprof/pprof.go:603 +0x79
runtime/pprof.writeGoroutine(0x269b340, 0xc4203440e0, 0x2, 0xc420d63870, 0x411658)
/usr/local/go/src/runtime/pprof/pprof.go:592 +0x44
runtime/pprof.(*Profile).WriteTo(0x2748740, 0x269b340, 0xc4203440e0, 0x2, 0xc4203440e0, 0xc420d63aa0)
/usr/local/go/src/runtime/pprof/pprof.go:302 +0x3b5
net/http/pprof.handler.ServeHTTP(0xc420ada071, 0x9, 0x26a9ac0, 0xc4203440e0, 0xc42132a400)
/usr/local/go/src/net/http/pprof/pprof.go:209 +0x1d1
net/http/pprof.Index(0x26a9ac0, 0xc4203440e0, 0xc42132a400)
@gouthamve
gouthamve / main.go
Created May 29, 2017 14:01
Complete runnable example
package main
import (
"fmt"
"io/ioutil"
"os"
"time"
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/labels"