Skip to content

Instantly share code, notes, and snippets.

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

Prithviraj Billa Prithvirajbilla

🏠
Working from home
View GitHub Profile
@Prithvirajbilla
Prithvirajbilla / http_streaming.md
Created August 20, 2018 13:35 — forked from CMCDragonkai/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@Prithvirajbilla
Prithvirajbilla / fix_github_https_repo.sh
Created July 2, 2018 21:35 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
// With little creativity and some coding skills you can do a lot of things using this code to annoy some one.
// works on the first chat box opened. only works in google chrome!
function dispatch(target) {
var evt = document.createEvent("Event");
evt.initEvent("keydown",true,true);
evt.keyCode = 13;
evt.which = 13;
target.dispatchEvent(evt);
}
//Works on http://web.whatsapp.com
// With little creativity and some coding skills you can do a lot of things using this code to annoy some one.
function dispatch(target, eventType, char) {
var evt = document.createEvent("TextEvent");
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(evt);
}
function triggerClick() {
var event = new MouseEvent('click', {
@Prithvirajbilla
Prithvirajbilla / getfeed.php
Created October 27, 2014 12:45
Get feed From URL with Basic Authorisation
<?php
function getfromweb($url, $username = null, $password = null) {
$opts = array('http' =>
array(
'method' => 'GET',
'header' => "Authorization: Basic ".base64_encode("$username:$password")."\r\n")
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
return $result;
@Prithvirajbilla
Prithvirajbilla / valentine.love
Created February 16, 2014 15:55
valentine's special
# abap
REPORT TEST.
WRITE 'I <3 you'.
#ada
procedure Hello is
begin
Put_Line ("I <3 you");
end Hello;
@Prithvirajbilla
Prithvirajbilla / index.html
Created May 21, 2013 14:34
A CodePen by PrithvirajBilla. Shape Shifter - A canvas experiment
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0">
<title>Shape Shifter</title>
<link rel="stylesheet" href="styles/normalize.css" >
<link rel="stylesheet" href="styles/style.css" >
</head>
@Prithvirajbilla
Prithvirajbilla / index.html
Created May 21, 2013 14:33
A CodePen by Kenneth. Shape Shifter - A canvas experiment
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0">
<title>Shape Shifter</title>
<link rel="stylesheet" href="styles/normalize.css" >
<link rel="stylesheet" href="styles/style.css" >
</head>
@Prithvirajbilla
Prithvirajbilla / index.html
Created May 21, 2013 14:31
A CodePen by PrithvirajBilla.
<div class='fluid'>
<header class='header clearfix'>
<span class='logo'></span>
<section class='top-nav last'>
<li><a href='#'>Tasks</a></li>
<li><a href='#'>Messages<span class='rednum'>74</span></a></li>
<li><a href='#'>Logout</a></li>
</section>
<section class='notification'>
@Prithvirajbilla
Prithvirajbilla / index.html
Created May 21, 2013 14:27
A CodePen by PrithvirajBilla. Spread - CSS Exploration: Origami like plane creation.
<div id="container"></div>
<div id="tag" class="before">
<h1>SPREAD</h1>
<p>Click anywhere to have the plane spread</p>
<ul>
<li><a href="https://github.com/MathiasPaumgarten/spread">Github</a></li>
</ul>
<span>by <a href="http://mathias-paumgarten.com">Mathias Paumgarten</a></span>
</div>