Skip to content

Instantly share code, notes, and snippets.

View mcornella's full-sized avatar

Marc Cornellà mcornella

View GitHub Profile
@DrPaulBrewer
DrPaulBrewer / UploaderForGoogleDrive.js
Last active December 17, 2022 09:49
Upload Browser Blobs to Files in Google Drive API v3
// upload.js, from https://github.com/googledrive/cors-upload-sample
// Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain
// License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
//
// Implements Resumable Upload for Google Drive as described by
// https://developers.google.com/drive/v3/web/resumable-upload
//
// Modified by Paul Brewer, Economic and Financial Technology Consulting LLC
// Nov. 1 2017
// 1. use Google Drive API V3 instead of V2
# Name: Set-LastLoggedOnUser
# Author: James Schlackman
# Last Modified: May 31 2019
#
# Sets the last logged on user on the Windows login screen to a specificied AD user. Will first check
# for a user in the managedBy attribute of the current computer and offer the option to use that
# user automatically. If declined, prompts for an AD username to use instead.
#
# This script uses ADSI for AD queries inatead of the ActiveDirectory module since that module is not
# installed by default on standard workstations.
@koush
koush / .bash_profile
Last active February 23, 2022 23:54
Put this in your .bash_profile(s) to open VS Code on your local machine while SSH'd into a remote machine.
# this needs to be on the *remote* machine.
if [ ! -z "$SSH_CLIENT" ]
then
function code() {
local ssh_client_host=$(echo $SSH_CLIENT | cut -d ' ' -f1)
if [ -z "$1" ]
then
local argpath="."