Skip to content

Instantly share code, notes, and snippets.

View anandpathak's full-sized avatar
🐜
building slowly!

Anand anandpathak

🐜
building slowly!
View GitHub Profile
@cjoudrey
cjoudrey / twitter.js
Created November 5, 2011 16:37
Lazy-rendering in PhantomJS
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)
@anandpathak
anandpathak / slack-browserBot.js
Last active January 13, 2017 09:09
Slack auto message sender from browser
values1 = ["Hi!" , "How are you ? " , "fine " , "do you know, who I am ? " , "A bot ! :)"]
function dothis(i){
setTimeout(function(){
document.getElementById("msg_input").value= values1[i];
TS.view.submit()
},
i*6000);}
for(i=0;i<values1.length;i++)
dothis(i);
@anandpathak
anandpathak / linkedListreveseRecursively.c
Created January 24, 2016 16:47
Reversing linkedlist node recursively
//head points to the first node of the linked list
void reverse(struct node * ptr1){
struct node *ptr2;
if(ptr1->next !=NULL){
ptr2=ptr1->next;
reverse(ptr1->next);
temp=ptr2->next;
ptr2->next=ptr1;
ptr1->next=temp;
return ;