This file contains 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
$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; |
This file contains 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 global:Start-ForAllRepos | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter(Position=0)] | |
[string] | |
$Cmd = 'git status', | |
[Parameter(Position=1)] | |
[string[]] |
This file contains 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 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 |
This file contains 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
public class IncList<T> | |
{ | |
private readonly IDictionary<T,int> _incList; | |
public IncList() | |
{ | |
_incList = new Dictionary<T, int>(); | |
} | |
public void Add(T item) |
This file contains 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
void Main() | |
{ | |
int[] intArray = new int[]{ 51,83,2523,2452,124,656,254,115,15,5,5,15,156,4378,568,4,37,2,72,2,8,9,10,234,39,23,56,1,63,33}; | |
var list = intArray.ToList(); | |
list.Sort(); | |
var find = search(list,656); | |
find.Dump(); | |
} |
This file contains 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
internal class GOL | |
{ | |
private int _genCounter = 0; | |
private bool[,] _board; | |
private int _boardSize; | |
public void Play() | |
{ | |
Initialize(30); | |
PrintBoard(); |
This file contains 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
public static class AsyncEnumerableExtensions | |
{ | |
public static IAsyncEnumerable<TResult> SelectAsync<T, TResult>(this IEnumerable<T> enumerable, | |
Func<T, Task<TResult>> selector) | |
{ | |
return AsyncEnumerable.CreateEnumerable(() => | |
{ | |
var enumerator = enumerable.GetEnumerator(); | |
var current = default(TResult); |
This file contains 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
var awsCredentials = new BasicAWSCredentials("someaccesskey", "somesecretkey"); | |
var secretManager = new SecretManager(awsCredentials); | |
secretManager.StoreSecret("somesecretKey","mysecret","Just some test secret I wanted to try"); |
This file contains 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
internal class SecretManager | |
{ | |
private readonly AWSCredentials _credentials; | |
private readonly AmazonSecretsManagerConfig _config; | |
private readonly AmazonSecretsManagerClient _client; | |
public SecretManager(AWSCredentials creds) | |
{ | |
_credentials = creds; | |
_config = new AmazonSecretsManagerConfig { RegionEndpoint = RegionEndpoint.USEast2 }; |
This file contains 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
#Windows 10 Decrapifier 1803/1809 | |
#By CSAND | |
#Nov 14 2018 | |
# | |
# | |
#PURPOSE: Eliminate much of the bloat that comes with Windows 10. Change many privacy settings to be off by default. Remove built-in advertising, Cortana, OneDrive, Cortana stuff (all optional). Disable some data collection. | |
# Clean up the start menu for new user accounts. Remove a bunch of pre-installed apps, or all of them (including the store). Create a more professional looking W10 experience. Changes some settings no longer | |
# available via GPO for Professional edition. | |
# | |
#DISCLAIMER: Most of the changes are easily undone, but some like removing the store are difficult to undo. I encourage you to research these changes beforehand, and read through the script. |
NewerOlder