Skip to content

Instantly share code, notes, and snippets.

View drumer2142's full-sized avatar
:atom:

Fotis drumer2142

:atom:
View GitHub Profile
@rajarsheem
rajarsheem / GDrive.py
Last active March 9, 2023 20:58
Python terminal client for Google Drive for easy uploading, deleting, listing, sharing files or folders. (See usage in the comment)
from __future__ import print_function
import sys
import io
import pip
import httplib2
import os
from mimetypes import MimeTypes
@oswaldoacauan
oswaldoacauan / gist:7580474
Created November 21, 2013 12:06
jQuery - Serialize Form with File inputs
(function($) {
$.fn.serializeFiles = function() {
var form = $(this),
formData = new FormData()
formParams = form.serializeArray();
$.each(form.find('input[type="file"]'), function(i, tag) {
$.each($(tag)[0].files, function(i, file) {
formData.append(tag.name, file);
});