Skip to content

Instantly share code, notes, and snippets.

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

Gaurav Koley arkokoley

🏠
Working from home
View GitHub Profile
@arkokoley
arkokoley / star.py
Created February 28, 2018 18:08
Auto star repo in github
'''
Author: Gaurav Koley (arkokoley@live.in)
'''
import requests
import sys
from requests.auth import HTTPBasicAuth
username = raw_input("username: ")
password = raw_input("password: ")
@arkokoley
arkokoley / .dockerignore
Created January 27, 2018 07:18
Docker Deployment files for Rails with Solr
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite
/db/*.sqlite-journal
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
#include<stdio.h>
#include<stdlib.h>
typedef struct gnode{
int val;
char color;
int e;
} node;
typedef struct queue{
#include<stdio.h>
#include<stdlib.h>
typedef struct gnode{
int val;
char color;
} node;
typedef struct queue{
node *element;
#include<stdio.h>
#include<stdlib.h>
typedef struct gnode{
int val;
char color;
} node;
typedef struct queue{
node *element;
@arkokoley
arkokoley / ReadRFIDTags.ino
Created April 18, 2015 13:16
Read RFID Tags via EM-18 RFID Reader
//ReadTag.ino
char input[12];
int count = 0;
void setup()
{
Serial.begin(9600);
}
#include<stdio.h>
int main(int argc, char*argv[]){
FILE *file = fopen(argv[1],"r");
int a,b,c,N[1000],i;
fscanf(file,"%d\n%d\n%d\n",&a,&b,&c);
printf("%d %d %d\n",a,b,c);
for(i=0;!feof(file);++i){
N[i] = fgetc(file) - '0';
if(feof(file))
@arkokoley
arkokoley / keybase.md
Created October 24, 2014 22:33
keybase.md

Keybase proof

I hereby claim:

  • I am arkokoley on github.
  • I am arkokoley (https://keybase.io/arkokoley) on keybase.
  • I have a public key whose fingerprint is 6888 63F9 50DA 8D04 FDDA 7B60 AE27 BEF2 27CC 67FB

To claim this, I am signing this object:

@arkokoley
arkokoley / nav.js
Last active December 22, 2015 02:28
JS script to anchor all h2 tags.
function addAnchors(){
//loop through all your headers
$.each($('h3'),function(index,value){
//append the text of your header to a list item in a div, linking to an anchor we will create on the next line
$('#box-anchors').append('<li><a href="#anchor-'+index+'">'+$(this).html()+'</a></li>');
//add an a tag to the header with a sequential name
$(this).wrapInner('<a name="anchor-'+index+'">'+$(this).html()+'</a>');
});
}