Personal collection of basic examples / scripts.
FFmpeg Documentation
A complete, cross-platform solution to record, convert and stream audio and video.
Personal collection of basic examples / scripts.
FFmpeg Documentation
A complete, cross-platform solution to record, convert and stream audio and video.
# Script located in '.vscode\' | |
# Testing repos are in 'Github\" | |
$Git = Get-Command git.exe | |
$Path = "$PSScriptRoot\..\Github\" | |
$Backup = "$PSScriptRoot\GitList.txt" | |
$Repos = @() | |
Get-ChildItem $Path -Directory | ForEach-Object { | |
if (Test-Path "$($_)\.git") { |
<# | |
.SYNOPSIS | |
Create Directories and move files for each files extension. | |
#> | |
param([string]$Directory = $PWD) | |
function Move-File($x, $foldername) { | |
If (!(Test-Path $Directory\$foldername)) { | |
New-Item -ItemType Directory -Path $Directory -Name $foldername -ErrorAction Ignore | Out-Null |
""" | |
This script will recursively delete empty directories. | |
Script will default to the current directory, | |
Handled input with care, | |
A successful operation CANNOT be undone! | |
""" | |
import argparse |
<# | |
.SYNOPSIS | |
Generate a new ignore file via 'gitignore.io' | |
.LINK | |
https://www.toptal.com/developers/gitignore | |
#> | |
#Requires -Version 3.0 | |
Function New-Gitignore { |
Headless Script - Call a script file with a headless terminal window
Call Powershell - Call a powershell script
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Clone all gists of GitHub user with given username. | |
Clones all gist repos into the current directory, using the gist id as the | |
directory name. If the directory already exists as a git repo, try to perform a | |
'git pull' in it. | |
""" |
<# | |
.SYNOPSIS | |
Diffrent methods for displaying relative path | |
#> | |
# Existing Path | |
$PWD | Resolve-Path -Relative | |
# Replace String | |
$Path -replace [regex]::Escape((Get-Location).Path), '.' |