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
View generali-selenium-stete.md
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
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]),
$set(_albumartist,%albumartist%)
)
$if2(%_albumartist%,%artist%)
/
%_year%
@majkinetor
majkinetor / puppeteer.md
Last active Nov 11, 2018
Puppeteer #google #chrome
View puppeteer.md

Why

  • 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.

Notes

  • Works only with Chrome
@majkinetor
majkinetor / windows10.md
Last active Nov 5, 2018
Block windows 10 autoupdate #windows
View windows10.md

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
majkinetor / logitech.ahk
Last active Oct 9, 2018
Logitech #autohotkey
View logitech.ahk
;https://duckduckgo.com/?q=logitech_wireless_presenter_r400&t=ffab&iax=images&ia=images
#SingleInstance, force
#InstallKeybdHook
PgUp:: Msgbox <
PgDn:: Msgbox >
.:: MsgBox [__]
Esc::
F5:: Msgbox [|>]
@majkinetor
majkinetor / windows_time.md
Created Oct 8, 2018
Windows Time #powershell #windows #domain
View windows_time.md
> w32tm /resync /rediscover
Sending resync command to local computer
The computer did not resync because no time data was available.

> w32tm /config /manualpeerlist:pldc03.mfin.trezor.rs /syncfromflags:manual /reliable:yes /update
> Get-Service w32time | Restart-Service

> w32tm /query /source
pldc03.mfin.trezor.rs
@majkinetor
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 {
[CmdletBinding()]
Param(
[Uri]$Uri,
[Microsoft.PowerShell.Commands.WebRequestMethod]$Method = 'Get',
$Body = $null,
[PSCredential]$Credential
)
$headers = @{}
View git backup.md

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

@majkinetor
majkinetor / kubernetes.md
Last active Jul 3, 2018
Kubernetes notes #powershell #docker #kubernetes #windows
View kubernetes.md

Kubernetes

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
majkinetor / format.md
Last active Jun 26, 2018
Default object format #powershell
View format.md
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
    $obj.psobject.TypeNames.Insert(0,'Company.Computer.View')
You can’t perform that action at this time.