Skip to content

Instantly share code, notes, and snippets.

Miodrag Milić majkinetor

Block or report user

Report or block majkinetor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
2019-02-01T20:44:31.1763300Z ##[warning]File name doesn't indicate a full path to a executable file.
2019-02-01T20:44:31.1919593Z Executing the following command-line. (workingFolder = C:\agent\_work\2\s)
2019-02-01T20:44:31.1919593Z powershell -NoProfile ./Invoke-Build.ps1 -Browser firefox
2019-02-01T20:44:31.1919593Z Error message highlight pattern: 
2019-02-01T20:44:31.1919593Z Warning message highlight pattern: 
2019-02-01T20:44:33.0200855Z Build . C:\agent\_work\2\s\.build.ps1
2019-02-01T20:44:33.0825797Z Executing as: delos2\devops1
2019-02-01T20:44:33.1138276Z Task /./Run/Deps
2019-02-01T20:44:34.1138302Z Chocolatey v0.10.11
majkinetor / File naming
Last active Jan 12, 2019
Picard scripts #picard
View File naming
$if(%originalyear%, $set(_year,%originalyear%))
$if($not(%_year%), $set(_year,$left(%date%,4)))
$if($eq(%albumartist%,Various Artists),
$set(_albumartist,[Various Artists]),
majkinetor /
Last active Nov 11, 2018
Puppeteer #google #chrome


  • Chrome introduced headless chrome feature near the end of 2017. Previously phantomJS was used but since heeadless chrome it shouldn't be used and it isn't maintained any more
  • Chrome DevTools team maintains Puppeteers and it works via CDT protocol
  • When you install Puppeteer, it downloads a recent version of Chromium that is guaranteed to work with the API.


  • Works only with Chrome
majkinetor /
Last active Nov 5, 2018
Block windows 10 autoupdate #windows

How to stop Windows10 autom updates

Task Scheduler

Windows reenables thsi one even with permission change

  • Task Scheduler Library >> Microsoft >> Windows >> UpdateOchestrator

Block hosts

majkinetor / logitech.ahk
Last active Oct 9, 2018
Logitech #autohotkey
View logitech.ahk
#SingleInstance, force
PgUp:: Msgbox <
PgDn:: Msgbox >
.:: MsgBox [__]
F5:: Msgbox [|>]
majkinetor /
Created Oct 8, 2018
Windows Time #powershell #windows #domain
> w32tm /resync /rediscover
Sending resync command to local computer
The computer did not resync because no time data was available.

> w32tm /config / /syncfromflags:manual /reliable:yes /update
> Get-Service w32time | Restart-Service

> w32tm /query /source
majkinetor / gist:36b3b7e62c1a664f1b5c156309dc4cb2
Created Oct 3, 2018 — forked from jrotello/gist:8873462
Powershell helper to ease Elasticsearch interaction without curl
View gist:36b3b7e62c1a664f1b5c156309dc4cb2
function Invoke-Elasticsearch {
[Microsoft.PowerShell.Commands.WebRequestMethod]$Method = 'Get',
$Body = $null,
$headers = @{}
View git

git commit -am "Oh No" && git branch BACKUP && git checkout origin/master -b attempt2; # EZ PZ

majkinetor /
Last active Jul 3, 2018
Kubernetes notes #powershell #docker #kubernetes #windows


In admin shell

# prereq
cinst minikube
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

$adapter = 'ethernet', 'wi-fi' | %  { Get-NetAdapter -Name $_ } | ? Status -eq 'Up' | select -first 1
majkinetor /
Last active Jun 26, 2018
Default object format #powershell
function Get-Drive {
    $computer = 'localhost'
    $drive = Get-CimInstance -ClassName Win32_LogicalDisk -ComputerName $computer -Filter "DeviceID='C:'"
    $props = @{'ComputerName'=$computer;'FreeSpace'=$drive.FreeSpace}
    $obj = New-Object -TypeName PSObject -Property $props
You can’t perform that action at this time.