This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clear all Android packages and user data via ADB, by @noseratio | |
# Run: powershell -f adb-clear-packages.ps1 | |
# To get ADB: https://community.chocolatey.org/packages/adb | |
# | |
# Q: Why not a factory reset? | |
# A: https://www.reddit.com/r/Android/comments/naetg8/a_quick_powershell_script_for_clearing_user_data/gxtaswl?context=3 | |
$confirmation = Read-Host "This will clear all packages data and user files. Are you sure you want to proceed? (y|n)" | |
if ($confirmation -ne 'y') { | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# """THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND | |
# NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE | |
# DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, | |
# WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
# SOFTWARE.""" | |
# Bitcoin Cash (BCH) qpz32c4lg7x7lnk9jg6qg7s4uavdce89myax5v5nuk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Select-CaptureGroup { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] | |
[ValidateNotNullOrEmpty()] | |
[Microsoft.PowerShell.Commands.MatchInfo[]]$InputObject | |
) | |
begin {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:cached_network_image/cached_network_image.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'dart:convert'; | |
import 'package:dio/dio.dart'; | |
import "dart:math"; | |
void main() { | |
runApp(MyApp()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
# src: https://gist.github.com/apfelchips/62a71500a0f044477698da71634ab87b | |
# New-Item $(Split-Path "$($PROFILE.CurrentUserCurrentHost)") -ItemType Directory -ea 0; Invoke-WebRequest -Uri "https://git.io/JYZTu" -OutFile "$($PROFILE.CurrentUserCurrentHost)" | |
# ref: https://devblogs.microsoft.com/powershell/optimizing-your-profile/#measure-script | |
# ref: Powershell $? https://stackoverflow.com/a/55362991 | |
# ref: Write-* https://stackoverflow.com/a/38527767 | |
# Write-Host wrapper for Write-Information -InformationAction Continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
#Requires -Version 5 | |
<# | |
.Synopsis | |
Activates Windows via KMS | |
.DESCRIPTION | |
It's a drop in replacement for slmgr scripts | |
.EXAMPLE | |
Start-WindowsActivation -Verbose # Activates the local computer | |
.EXAMPLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Create Unix VM's. | |
PREREQUISITES: | |
- A VM that has been installed with an OS that supports cloud-init | |
- cloud-init is installed on the vm | |
How it works: | |
- Asks for a bunch of parameters | |
- Creates a disk from parent vhdx for speed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function UserPhoto ($user, [int]$width, [int]$height) { | |
$user_data = ([adsisearcher]"(&(objectClass=user)(sAMAccountName=$user))").FindAll() | |
$stream = [System.Io.MemoryStream]::new($user_data.Properties["thumbnailphoto"][0]) | |
$img = [System.Drawing.Image]::FromStream($stream) | |
if ($width -or $height) { | |
if (-not $width) { | |
$width = ($img.Width / $img.height) * $height | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.terraform/ | |
*.pem | |
*.tf | |
*.tfstate | |
*.yaml | |
*.backup | |
istio-*/ | |
cert-manager-*/ | |
*.swp | |
env |