Skip to content

Instantly share code, notes, and snippets.

View vibhavp's full-sized avatar

Vibhav Pant vibhavp

  • New Delhi, India
  • 09:46 (UTC +05:30)
View GitHub Profile
@vibhavp
vibhavp / upload.go
Last active January 16, 2016 06:07
upload.go
package main
import (
"bytes"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"os"
)
import.java.io*;
class sum
{
publicstaticvoidmain(StringArgs[])
throws IOException {
InputStreamreader ISR=newStreamReader(System.in);
BufferReader br=newBufferReader (IST);
int a;
Int a=Ingeter parseInt(br.readline )();
System.out.println("display a" "a");
@vibhavp
vibhavp / wsevent_test
Last active October 19, 2015 05:31
wsevent test code
package main
import (
ws "github.com/gorilla/websocket"
"github.com/vibhavp/wsevent"
"log"
"net/http"
)
var upgrader = ws.Upgrader{CheckOrigin: func(_ *http.Request) bool { return true }}
? github.com/TF2Stadium/Helen [no test files]
ok github.com/TF2Stadium/Helen/config 1.060s
? github.com/TF2Stadium/Helen/config/stores [no test files]
? github.com/TF2Stadium/Helen/controllers [no test files]
? github.com/TF2Stadium/Helen/controllers/broadcaster [no test files]
ok github.com/TF2Stadium/Helen/controllers/controllerhelpers 1.129s
==================
WARNING: DATA RACE
Write by main goroutine:
github.com/TF2Stadium/Helen/controllers/broadcaster.Init()
@vibhavp
vibhavp / createLobby.go
Created July 12, 2015 05:02
createLobby
so.On("createLobby", func(jsonstr string, response func(string)) {
var id int //placeholder variable
js, err := simplejson.NewFromReader(strings.NewReader(jsonstr))
if err != nil {
//Error
}
mapName, _ := js.Get("mapName").String()
format, _ := js.Get("format").String()
@vibhavp
vibhavp / Assembly
Last active August 29, 2015 14:23
Optimising stuff
.file "array.c"
.section .text.unlikely,"ax",@progbits
.LCOLDB0:
.section .text.startup,"ax",@progbits
.LHOTB0:
.p2align 4,,15
.globl main
.type main, @function
main:
movl $5, %eax
.file "exit.c"
.globl e
.section .rodata
.LC0:
.string "\270<"
.string ""
.string ""
.string "\017\005"
.section text,"aw",@progbits
.align 8
char *e __attribute__((section ("text"))) = "\xb8\x3c\x00\x00\x00\x0f\x05";
void _start()
{
((void(*)())(e))();
}
0000000000400080 <.text>:
400080: b8 3c 00 00 00 mov $0x3c,%eax
400085: 0f 05 syscall

Keybase proof

I hereby claim:

  • I am vibhavp on github.
  • I am vibhavp (https://keybase.io/vibhavp) on keybase.
  • I have a public key whose fingerprint is 7ED1 D48C 513C A024 BE3A 785F E3FB 28CB 6AB5 9598

To claim this, I am signing this object: