Skip to content

Instantly share code, notes, and snippets.

View dariusz-wozniak's full-sized avatar
🏀

Dariusz Woźniak dariusz-wozniak

🏀
View GitHub Profile
@dariusz-wozniak
dariusz-wozniak / javascript-object-and-prototypes.js
Created January 13, 2019 17:57
📝 JavaScript Objects and Prototypes (Pluralsight course) — Notes
// Readonly property:
// throws TypeError when 'use strict';
var cat = {
name: 'Fluffy'
};
Object.defineProperty(cat, 'name', {writable: false});
@dariusz-wozniak
dariusz-wozniak / excel-functions-pl-en.csv
Last active January 13, 2019 19:46
📊 Tłumaczenia funkcji w Excelu polski <> angielski
PL EN
ATANH ATANH
ATAN2 ATAN2
ATAN ATAN
ASINH ASINH
ASIN ASIN
ASC ASC
ARKUSZE SHEETS
ARKUSZ SHEET
ARG.LICZBY.ZESP IMARGUMENT
@dariusz-wozniak
dariusz-wozniak / ChocoBasicSetupOnAnyMachine.ps1
Created January 13, 2019 19:45
🍫 Chocolatey setup on any machine
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
@dariusz-wozniak
dariusz-wozniak / ChocoDecrapSetup.ps1
Created January 13, 2019 19:45
🍫 Chocolatey decrap setup
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
@dariusz-wozniak
dariusz-wozniak / SummarizeChocoUpgradeLog.csx
Created January 13, 2019 19:46
🍫 Summarize Chocolatey upgrade log
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>();
@dariusz-wozniak
dariusz-wozniak / FilterChocoUpgradeLog.csx
Created January 13, 2019 19:47
🍫 Filter Chocolatey upgrade log
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);
@dariusz-wozniak
dariusz-wozniak / ChocoUpgradeAll.ps1
Created January 13, 2019 19:48
🍫 Upgrade all Chocolatey packages and summarize logs (see other Gists)
$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"
@dariusz-wozniak
dariusz-wozniak / RunCmderMinimized.ahk
Created January 13, 2019 19:50
Run Cmder minimized (AutoHotkey script)
Run, c:\tools\cmdermini\vendor\conemu-maximus5\ConEmu64.exe -min
@dariusz-wozniak
dariusz-wozniak / AllowPastingTextInCmd.ahk
Created January 13, 2019 19:51
Allow pasting text in cmd.exe (AutoHotkey script)
; Allow to paste text in command line by cltr+v
#IfWinActive ahk_class ConsoleWindowClass
^V::
SendInput {Raw}%clipboard%
return
#IfWinActive
@dariusz-wozniak
dariusz-wozniak / Set-LocationWithChildItem.ps1
Created January 13, 2019 19:52
Set location with child item (cd + ls)
# TIP: You may also use: cd ..; ls
function Set-LocationWithChildItem
{
param($path)
cd $path; ls
}
Set-Alias ccd Set-LocationWithChildItem -Force