Skip to content

Instantly share code, notes, and snippets.

View pranaygp's full-sized avatar

Pranay Prakash pranaygp

View GitHub Profile
@pranaygp
pranaygp / CSShover.min.js
Created June 25, 2013 07:52
Simple function that changes css property on mouse enter, and reverts back to the original on mouse leave... REQUIRES jQuery Usage: $('selector').CSShover('property','value') Example: $('#link').CSShover('color','#ff0000')
(function(a){jQuery.fn.CSShover=function(d,c){var b;this.hover(function(){b=a(this).css(d);a(this).css(d,c);},function(){a(this).css(d,b);});};})(jQuery);
/**
* Made by Pranay Prakash <pranay.gp@gmail.com>
*/
public static String GET(String url){
InputStream inputStream = null;
String result = "";
try {
// create HttpClient
HttpClient httpclient = new DefaultHttpClient();
@pranaygp
pranaygp / SLEEP_LOG.md
Last active April 24, 2016 21:32
This is a log of my nap timings during an experimental attempt at polyphasic sleep. The intention of this log is to help sleep researchers to be able to do the amazing things that they do (This might be more relevant when this experiment is a failure/success in the long term). To that effect, I've commented on a few of my naps. For more informat…

20 April 2016

  • 1:00 to 1:20 PM
  • 9:08 to 9:28 PM

21 April 2016

  • 12:20 to 12:40 AM
  • 2:43 to 3:03 AM
@pranaygp
pranaygp / README.md
Last active October 30, 2017 03:39
Answers to my Github writing assignment

Describe how a typical AJAX call on a web page works. Please describe the various systems involved, what they do, and how they interact.

AJAX requests are requests made from a client (browser) to a server after the initial page has already been loaded. It starts with some sort of user code that sets up an HTTP request with all the parameters needed for the request (status code, headers, body). In javascript, this is done with the XMLHttpRequest object. The client then makes the HTTP request to an URL which points to the server. On receiving the request, the server can act upon it and return data (which nowadays is usually in JSON) back to the client. The important thing with AJAX here is that it's asynchronous, so the client wasn't blocked and could perform other actions while waiting for the server to respond. Once the server does respond, the client can parse the incoming data and update the DOM with the results if it'd like to. In addition to userland code that's typically written in javascript to per

@pranaygp
pranaygp / verify.txt
Created December 21, 2017 17:52
Verifying my Blockstack ID is secured with the address 1GP8HFUDjS74fTYZCJA5CzJDpKbKqEHNsu https://explorer.blockstack.org/address/1GP8HFUDjS74fTYZCJA5CzJDpKbKqEHNsu
Verifying my Blockstack ID is secured with the address 1GP8HFUDjS74fTYZCJA5CzJDpKbKqEHNsu https://explorer.blockstack.org/address/1GP8HFUDjS74fTYZCJA5CzJDpKbKqEHNsu
@pranaygp
pranaygp / keybase.txt
Created December 23, 2017 05:03
Keybase verification
### Keybase proof
I hereby claim:
* I am pranaygp on github.
* I am pranaygp (https://keybase.io/pranaygp) on keybase.
* I have a public key whose fingerprint is 69CC 0E8F 6D41 F637 3F9D AE17 5472 4989 7F9B E56F
To claim this, I am signing this object:
const string = JSON.stringify({
a: 1,
b: 1,
c: 1,
d: 1,
e: 1,
f: 1,
g: 1,
h: 1,
a1: 1,
@pranaygp
pranaygp / README.md
Created November 11, 2018 19:05
tree-sitter-error-repro

setup

import repro.js from the main process of an electron app

output

(program)
Typing a
(program (expression_statement (identifier)))