Skip to content

Instantly share code, notes, and snippets.

@DCCoder90
DCCoder90 / gdown.py
Created September 14, 2020 22:35
Download file from Google Drive using CLI. https://stackoverflow.com/a/39225039
import requests
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
@DCCoder90
DCCoder90 / Start-ForAllRepos.ps1
Created May 15, 2021 00:45
Powershell scrip to iterate through a directory containing git repos and perform a specified action. https://stackoverflow.com/questions/66249041/iterate-thru-all-folders-at-the-current-path-where-the-script-resides
function global:Start-ForAllRepos
{
[CmdletBinding()]
param (
[Parameter(Position=0)]
[string]
$Cmd = 'git status',
[Parameter(Position=1)]
[string[]]
@DCCoder90
DCCoder90 / combineCSV.ps1
Created July 22, 2021 00:25
Combine all CSVs in directory to single CSV
$CSVFolder = 'C:\path\to\directory\with\csvs';
$OutputFile = 'C:\path\to\combined.csv';
$CSV = Get-ChildItem -Path $CSVFolder -Filter *.csv | ForEach-Object {
Import-Csv -Path $_
}
$CSV | Export-Csv -Path $OutputFile -NoTypeInformation -Force;