Skip to content

Instantly share code, notes, and snippets.

View abhishekbhalani's full-sized avatar
🎄
working on latest framework...

Abhishek B. abhishekbhalani

🎄
working on latest framework...
View GitHub Profile
@abhishekbhalani
abhishekbhalani / download.js
Created September 23, 2022 11:41 — forked from mkaminsky11/download.js
How to manipulate Google Drive files
/*
Download a file
*/
function downloadFile(fileId) {
var request = gapi.client.drive.files.get({
'fileId': fileId
});
request.execute(function(resp) {
window.location.assign(resp.webContentLink);
});
@abhishekbhalani
abhishekbhalani / 1_README.md
Created September 5, 2022 12:12 — forked from Daniel15/1_README.md
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@abhishekbhalani
abhishekbhalani / arraybuffer-blob-filereader-localStorage.js
Created September 5, 2022 12:12 — forked from robnyman/arraybuffer-blob-filereader-localStorage.js
Get file as an arraybuffer, create blob, read through FileReader and save in localStorage
// Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob
var rhinoStorage = localStorage.getItem("rhino"),
rhino = document.getElementById("rhino");
if (rhinoStorage) {
// Reuse existing Data URL from localStorage
rhino.setAttribute("src", rhinoStorage);
}
else {
// Create XHR, Blob and FileReader objects
var xhr = new XMLHttpRequest(),
@abhishekbhalani
abhishekbhalani / MasterClass.cs
Last active December 6, 2019 12:04
Current Calculation Logic
public class CalculationA
{
public string str1 {get;set;}
public string str2 {get;set;}
// 40 around properties
}
public class CalculationB{
public string str3 {get;set;}
public string str4 {get;set;}
@abhishekbhalani
abhishekbhalani / connectHTMLelements_SVG.png
Created September 13, 2017 12:50 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@abhishekbhalani
abhishekbhalani / connectHTMLelements_SVG.png
Created September 13, 2017 12:50 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@abhishekbhalani
abhishekbhalani / custom_theme.css
Created September 25, 2012 10:44 — forked from JamieLottering/custom_theme.css
DropKick Examples
.dk_theme_black {
background: #aebcbf;
background: -moz-linear-gradient(top,
#aebcbf 0%,
#6e7774 50%,
#0a0e0a 51%,
#0a0809 100%
);
background: -webkit-gradient(linear,
left top,