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 TV.md

TV za III/2

Sledeće karakteristike su najbitnije za dati kontekst

  • Primarno što veći ekran, da bi sva deca mogla da lako vide sadržaj, iz zadnjih klupa
  • Jačina zvuka, da bi deca mogla lako da čuju sadržaj iz zadnjih klupa
  • Da se kupuje u lokalnoj renomiranoj radnji radi garancije u slučaju kvara sa poželjnom dužom garancijom
  • Zgodno je da ima WiFi da bi Internet sadržaj mogao direktno sa TV da se koristi bez preduslova (ako škola ima WiFi)

Sledeće karakteristike nisu od značaja:

@majkinetor
majkinetor / rust.md
Last active Sep 9, 2019
Rust on-boarding #rust #windows
View rust.md

Rust, Rustup, cargo

  • Chocolatey: cinst rust rustup visualstudio2017-workload-vctools (not the same as running rustup-init directlly, installs globally etc)
  • https://rustup.rs installs in /~.cargo:
    iwr https://win.rustup.rs/x86_64 -outf rustup-init.exe
    ./rustup-init -y
    refreshenv
    cinst visualstudio2017-workload-vctools
    
@majkinetor
majkinetor / gist:14c379bda630d0730db7f6db45bfce59
Last active Jul 25, 2019 — forked from TLaborde/gist:22359e9029f3bc03872c208406d64d5d
Using powershell for "realtime" notification on a dashboard #powershell
View gist:14c379bda630d0730db7f6db45bfce59

As requested on reddit, here is some information about how i made a "realtime" dashboard.

Flow

  1. a task grab data with a scheduled job. It saves the data in json in two places: one static folder, which overwrite existing data, and in a temporary folder, to be a new "event".
  2. a websocket deamon (websocketd) run a powershell script listening to changes in the temporary folder. When a change happens, the new data is read and sent thru the websocket
  3. the frontend update the data with what came thru the websocket. If the browser does not support websocket, it will instead pull the data from time to time

Grabbing Data and saving as JSON

@majkinetor
majkinetor / generali-selenium-stete.md
Last active Jul 25, 2019
Generali Selenium Log #jobs
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
Last active Jul 25, 2019 — forked from jrotello/gist:8873462
Powershell helper to ease Elasticsearch interaction without curl #powershell #elasticsearch
View gist:36b3b7e62c1a664f1b5c156309dc4cb2
function Invoke-Elasticsearch {
[CmdletBinding()]
Param(
[Uri]$Uri,
[Microsoft.PowerShell.Commands.WebRequestMethod]$Method = 'Get',
$Body = $null,
[PSCredential]$Credential
)
$headers = @{}
You can’t perform that action at this time.