Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Busy with some spring code

Dheeraj Singh dheeraj-thedev

💭
Busy with some spring code
View GitHub Profile
@dheeraj-thedev
dheeraj-thedev / submit.md
Created May 1, 2021 — forked from tanaikech/submit.md
Upload Files to Google Drive using Javascript
View submit.md

Upload Files to Google Drive using Javascript

News

At October 11, 2019, I published a Javascript library to to run the resumable upload for Google Drive. When this is used, the large file can be uploaded. You can also use this js library.

Description

This is a sample script for uploading files to Google Drive using Javascript. The files are uploaded by Drive API v3. gapi.client.drive.files.create() can create an empty file on Google Drive. But it cannot directly upload files including contents. I think that this might not be able to upload files and metadata with the multipart/related, although this might be resolved by the future update. So now, as one of workarounds, I use using XMLHttpRequest.

  • This sample uses gapi.
    • Before you use this, please enable Drive API at API console and carr
@dheeraj-thedev
dheeraj-thedev / basic_router.jsx
Created Apr 23, 2021 — forked from siakaramalegos/basic_router.jsx
Basic example of React Router: BrowserRouter, Link, Route, and Switch
View basic_router.jsx
// BrowserRouter is the router implementation for HTML5 browsers (vs Native).
// Link is your replacement for anchor tags.
// Route is the conditionally shown component based on matching a path to a URL.
// Switch returns only the first matching route rather than all matching routes.
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
View jquery-exercises.md

Here are some mini exercises to challenge your jQuery skills a bit.

Instructions

Create a new page on jsbin.com and add the following script tag to it:

<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
@dheeraj-thedev
dheeraj-thedev / Dice.java
Created Jun 30, 2020 — forked from ReticentIris/Dice.java
Dice program demonstrating the use of graphic powered buttons.
View Dice.java
//Imports
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
public class Dice extends JFrame{
//Nested die class.
private class Die {
private int val;
@dheeraj-thedev
dheeraj-thedev / requirements.md
Created Jan 14, 2018 — forked from vigzmv/requirements.md
Into the React - Requirements
View requirements.md

Please make sure you have the following requirements installed on your systems before the event.

1. Chrome: Latest or at least > 62

Get Chrome

2. Node: Latest or at least > 9.2 and (npm > 5.5 and/or yarn > 1.3)

Get Node

Check your node version