Skip to content

Instantly share code, notes, and snippets.

View mcornella's full-sized avatar

Marc Cornellà mcornella

View GitHub Profile
@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="."
<#
.SYNOPSIS
Sets the last logged on user at the login screen.
.DESCRIPTION
Sets the last logged on user on the Windows login screen to a specificied AD user. If not specified
at launch, it 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 instead of the ActiveDirectory module since that module is not
@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