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
Add-Type -A System.IO.Compression.FileSystem | |
[IO.Compression.ZipFile]::CreateFromDirectory('C:\full\path\folder', 'c:\full\path\foler-output.zip') |
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
git log --pretty=format:"%ad - %an: %s" --after="2017-01-22" --until="2017-02-18" --author="Rodriguez, Omar" --stat |
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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2019-10-01 14:50:11" build="190331"> | |
<value name="Language" type="string" data="en"/> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{main-group}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Java.Util.Zip; | |
namespace foo | |
{ | |
public class ZippingAround |
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
while ($true) {Start-Sleep -Seconds 1; iex 'adb -s 192.168.1.1 shell tail /sdcard/some-folder/some-log.log';} |
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
[CmdletBinding()] | |
param() | |
# Create service user | |
$username = "SvcUsr" | |
if (!(Get-LocalUSer -Name $username -ErrorAction SilentlyContinue)) { | |
Write-Host "Enter password for $username :" | |
$usrPw = Read-Host -AsSecureString | |
New-LocalUser -Name $username -Password $usrPw -PasswordNeverExpires | |
} else { |
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
private static void DoWork() | |
{ | |
var nics = NetworkInterface.GetAllNetworkInterfaces(); | |
NetworkInterface nicToUse = null; | |
foreach (var nic in nics) | |
{ | |
Console.WriteLine($"NicName={nic.Name}"); | |
if (nic.Name == "Local Area Connection 2") nicToUse = nic; | |
} |
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
<# | |
.SYNOPSIS | |
Name: Verb-Noun.ps1 | |
The purpose of this script is to blah blah. | |
.DESCRIPTION | |
A slightly longer description of Why and How? | |
.PARAMETER ExampleParameter | |
The ExampleParameter is a required string parameter. |
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
git log --pretty=format: --name-only | Where-Object { ![string]::IsNullOrEmpty($_) -and !$_.EndsWith('.csproj') -and !$_.EndsWith('.config') } | Sort-Object | Group-Object | Sort-Object -Property Count -Descending | Select-Object -Property Count, Name -First 10 |
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
# One-liner in newer powershell | |
# Test-NetConnection 192.168.1.1 -Port 5555 | |
[CmdletBinding()] | |
param( | |
[int]$Port = 5555, | |
[string]$Net = "10.0.1" | |
) |