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
Get-ChildItem *.md -Recurse | sls "path" | Format-table |
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
Assert.That(2 + 2, Is.EqualTo(4)); | |
Assert.That(2 + 2, Is.EqualTo(5)); | |
Assert.That(2 + 2, Is.EqualTo(6)); |
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
// Hoisting | |
'use strict'; | |
console.log(productId); // undefined | |
var productId = 12; | |
// No hoisting with let keyword |
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
# TIP: You may also use: cd ..; ls | |
function Set-LocationWithChildItem | |
{ | |
param($path) | |
cd $path; ls | |
} | |
Set-Alias ccd Set-LocationWithChildItem -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
; Allow to paste text in command line by cltr+v | |
#IfWinActive ahk_class ConsoleWindowClass | |
^V:: | |
SendInput {Raw}%clipboard% | |
return | |
#IfWinActive |
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
Run, c:\tools\cmdermini\vendor\conemu-maximus5\ConEmu64.exe -min |
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
$chocoLogPath = "f:\Logs\chocoUpdate.log" | |
$chocoSummaryPath = "f:\Logs\ChocoUpdateSummary.log" | |
$chocoVersionsPath = "f:\Logs\ChocoUpdateVersionsSummary.csv" | |
Write-Host "Updating Chocolatey packages and log to $chocoLogPath" | |
"-------------------------------------------------------------------------" | Out-File -FilePath $chocoLogPath -Append | |
"Date-Time of Upgrading: " | Out-File -FilePath $chocoLogPath -Append -NoNewLine | |
(Get-Date).ToString("yyyy-MM-dd HH:mm:ss") | Out-File -Append $chocoLogPath | |
choco upgrade all --confirm --limit-output | Out-File -Append $chocoLogPath | |
scriptcs F:\Scripts\Setup\FilterChocoUpgradeLog.csx -- "$chocoLogPath" "$chocoSummaryPath" |
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
using System; | |
using System.IO; | |
public class FilterChocoUpgradeLog | |
{ | |
public static void FilterAndWrite(string logToRead, string logToWrite) | |
{ | |
var linesToWrite = new List<string>(); | |
string[] lines = File.ReadAllLines(logToRead); |
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
using System; | |
using System.IO; | |
public class SummarizeChocoUpgradeLog | |
{ | |
private static char s = ';'; | |
public static void FilterAndWrite(string logSummary, string logToWrite) | |
{ | |
var linesToWrite = new List<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
Write-Host "### Installing Chocolatey" | |
if (-Not (Test-Path "$env:chocolateyInstall")) | |
{ | |
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex | |
} | |
Write-Host "### Configuring Chocolatey" | |
choco upgrade all | |
choco feature enable -n=allowGlobalConfirmation | |
choco feature enable -n=allowEmptyChecksums |