Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View peeyushsrj's full-sized avatar

Peeyush Singh peeyushsrj

View GitHub Profile
@peeyushsrj
peeyushsrj / prerenderingCache.go
Last active February 22, 2016 16:46
Implementation of prerender.io service in golang
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"time"
@peeyushsrj
peeyushsrj / README-Template.md
Created February 22, 2016 16:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

Keybase proof

I hereby claim:

  • I am peeyushsrj on github.
  • I am peeyushsrj (https://keybase.io/peeyushsrj) on keybase.
  • I have a public key whose fingerprint is 46C3 1917 1E84 1C04 E988 4A99 E3EB 0EAF 703C C23B

To claim this, I am signing this object:

package main
import (
// "fmt"
// "io"
"net/http"
"log"
)
func HelloServer(w http.ResponseWriter, req *http.Request) {
@peeyushsrj
peeyushsrj / teleg-server.go
Last active February 1, 2017 01:21
Hosting a telegram go webhook on digitalocean
package main
import (
"gopkg.in/telegram-bot-api.v4"
"log"
"net/http"
)
func main() {
bot, err := tgbotapi.NewBotAPI("328357664:AAGrnpzHV6_mzy-OCm5trALxdMstwNyZEHQ")
@peeyushsrj
peeyushsrj / main.go
Created February 13, 2017 22:15
Efficient Data Structure for Graph Social Network using golang
package main
import (
"encoding/json"
"log"
"net/http"
)
type Relationship struct {
Rid int
@peeyushsrj
peeyushsrj / walk.go
Last active March 14, 2017 13:03 — forked from tdegrunt/walk.go
Replace some text in a bunch of files with golang
package main
import (
"fmt"
"io/ioutil"
"os"
"bufio"
"path/filepath"
"strings"
)
@peeyushsrj
peeyushsrj / set_cookiejar.go
Created June 8, 2017 15:52 — forked from HugoPresents/set_cookiejar.go
golang set cookieJar example
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/cookiejar"
"net/url"
"strings"
)
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
invoice: 34843
date : 2001-01-23
bill-to: &id001
given : Chris
family : Dumars
address:
lines: |
458 Walkman Dr.
Suite #292
city : Royal Oak