I hereby claim:
- I am alan-null on github.
- I am alan_null (https://keybase.io/alan_null) on keybase.
- I have a public key whose fingerprint is 8BFF 7CAE 688C ADDD 8FCE D2C2 812E F493 7923 4DCA
To claim this, I am signing this object:
function Create-AesManagedObject($key, $IV) { | |
$aesManaged = New-Object "System.Security.Cryptography.AesManaged" | |
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC | |
$aesManaged.Padding = [System.Security.Cryptography.PaddingMode]::Zeros | |
$aesManaged.BlockSize = 128 | |
$aesManaged.KeySize = 256 | |
if ($IV) { | |
if ($IV.getType().Name -eq "String") { | |
$aesManaged.IV = [System.Convert]::FromBase64String($IV) | |
} |
using Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Parameters; | |
using Org.BouncyCastle.OpenSsl; | |
using Org.BouncyCastle.Security; | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
namespace MyProject.Data.Encryption | |
{ |
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace RsaEncryptionSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
# This is a super **SIMPLE** example of how to create a very basic powershell webserver | |
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity. | |
# Http Server | |
$http = [System.Net.HttpListener]::new() | |
# Hostname and port to listen on | |
$http.Prefixes.Add("http://localhost:8080/") | |
# Start the Http Server |
function exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Modified by: alirobe <[email protected]> based on my personal preferences. | |
# Version: 2.20.2, 2018-09-14 | |
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
# Tweak difference: | |
# | |
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
I hereby claim:
To claim this, I am signing this object:
function Resolve-MsBuild { | |
$msb2017 = Resolve-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\*\*\MSBuild\*\bin\msbuild.exe" -ErrorAction SilentlyContinue | |
if($msb2017) { | |
Write-Host "Found MSBuild 2017 (or later)." | |
Write-Host $msb2017 | |
return $msb2017 | Select-Object -First 1 | |
} | |
$msBuild2015 = "${env:ProgramFiles(x86)}\MSBuild\14.0\bin\msbuild.exe" |