[
  {
    "path": "Android/uninstall-s21-bloatware",
    "content": "# Install Android Debug Bridge (adb) https://developer.android.com/studio/command-line/adb\n# Install the Universal ADB Drivers https://adb.clockworkmod.com/\n# Run in PowerShell: Get-Content .\\uninstall-s21-bloatware | adb shell\n\n# Bixby\npm uninstall --user 0 com.samsung.android.bixby.service\npm uninstall --user 0 com.samsung.android.app.routines\npm uninstall --user 0 com.samsung.android.visionintelligence\npm uninstall --user 0 com.samsung.android.bixby.agent\npm uninstall --user 0 com.samsung.android.bixby.agent.dummy\npm uninstall --user 0 com.samsung.android.bixbyvision.framework\npm uninstall --user 0 com.samsung.android.bixby.wakeup\n\n# AR Zone\npm uninstall --user 0 com.samsung.android.ardrawing\npm uninstall --user 0 com.samsung.android.aremoji\npm uninstall --user 0 com.samsung.android.aremojieditor\npm uninstall --user 0 com.sec.android.mimage.avatarstickers\npm uninstall --user 0 com.samsung.android.arzone\npm uninstall --user 0 com.samsung.android.livestickers\n\n# Samsung Calendar: redundant, use Google Calendar\npm uninstall --user 0 com.samsung.android.calendar\n\n# Samsung Contacts: redundant, use Google Contacts\npm uninstall --user 0 com.samsung.android.app.contacts\n\n# Samsung Pass Autofill and Framework\npm uninstall --user 0 com.samsung.android.samsungpassautofill\npm uninstall --user 0 com.samsung.android.samsungpass\n\n# Samsung Group Sharing\npm uninstall --user 0 com.samsung.android.mobileservice\n\n# Samsung Kids\npm uninstall --user 0 com.samsung.android.kidsinstaller\n\n# Samsung Cloud\npm uninstall --user 0 com.samsung.android.scloud\n\n# Dictionary\npm uninstall --user 0 com.diotek.sec.lookup.dictionary\n\n# upday\npm uninstall --user 0 de.axelspringer.yana.zeropage\n\n# Android Auto\npm uninstall --user 0 com.google.android.projection.gearhead\n\n# Microsoft OneDrive\npm uninstall --user 0 com.microsoft.skydrive\n\n# Netflix\npm uninstall --user 0 com.netflix.mediaclient\n\n# Talkback\npm uninstall --user 0 com.samsung.android.accessibility.talkback\n\n# Voice Assistant\n# Samsung Gallery\n# Clock\n# Game Launcher\n# Samsung Keyboard\n# Samsung Checkout\n# Samsung Capture\n# Samsung Visit In\n# Samsung Create movie\n# Samsung Video Editor\n# Samsung GameOptimizingService\n# Samsung Game Booster\n# Samsung Customizaion Service\n\n# Samsung Link to Windows Service\n# Samsung Sticker Center\n# Samsung Media and Devices\n# Samsung Keyboard Content Center\n# Samsung SmartThings Framework\n# Samsung Private Share\n# Samsung Link sharing\n# Samsung TTS\n"
  },
  {
    "path": "Chrome/README.md",
    "content": "# Chrome\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc)* -->\n\n- [Export/import search engines](#exportimport-search-engines)\n- [Disable notifications from all sites](#disable-notifications-from-all-sites)\n- [Change Google Chrome cache folder](#change-google-chrome-cache-folder)\n- [Install Chrome in Ubuntu](#install-chrome-in-ubuntu)\n- [Set the Material You theme](#set-the-material-you-theme)\n- [Must have extensions](#must-have-extensions)\n- [YouTube extensions](#youtube-extensions)\n- [Other useful extensions](#other-useful-extensions)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Make a Chrome shortcut open the default profile in Windows\n\nAppend `--profile-directory=\"Default\"` to the target of the shortcut\n\n## Export/import search engines\n\n1. Enter [`chrome://settings/searchEngines`](chrome://settings/searchEngines) in the address bar of Chrome to\n\n1. Run the code in the following files in your DevTools console:\n\n   - to export to a JSON file: [`export.js`](export.js)\n   - to import from a JSON file: [`import.js`](import.js)\n\n* [Source](https://superuser.com/a/1458616/54747)\n\n## Disable notifications from all sites\n\nSettings > Site Settings > Notifications > Sites can ask to send notifications = OFF\n\n## Change Google Chrome cache folder\n\n```powershell\n$Path = \"Registry::HKEY_LOCAL_MACHINE\\Software\\Policies\\Google\\Chrome\"\nif (-not (Test-Path $Path)) { New-item -Path $Path -Force }\nSet-ItemProperty -Path $Path -Name 'DiskCacheDir' -Value 'C:\\Temp\\Chrome'\n```\n\nThis will move Chrome cache folder to `C:\\Temp\\Chrome` system-wide, for every user and regardless where Chrome is started from (shortcut or command line).\n\nDefault value: `%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default\\Cache`\n\n- [Source](http://www.chromium.org/administrators/policy-list-3#DiskCacheDir)\n\n## Install Chrome in Ubuntu\n\n```sh\nwget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - \nsudo sh -c 'echo \"deb https://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list'\nsudo apt-get update\nsudo apt-get install google-chrome-stable\n```\n\n## Set the Material You theme\n\n1. three-dot menu in the top-right corner > _Help_ > _About Google Chrome_;\n\n1. verify you have at version 116.0.5845.179/.180 or higher;\n\n1. paste `chrome://flags` in the address bar and press Enter;\n\n1. search for _Chrome Refresh_ \n\n1. enable both the following flags:\n   \n   ```\n   chrome://flags/#chrome-refresh-2023\n   chrome://flags/#chrome-webui-refresh-2023\n   ```\n\n1. click on _Relaunch_ at the bottom.\n\nSee also:\n\n- [Chrome gets a fresh look and new features for its 15th birthday](https://blog.google/products/chrome/google-chrome-new-features-redesign-2023/)\n\n## Must have extensions\n\n- [I don't care about cookies](https://chrome.google.com/webstore/detail/i-dont-care-about-cookies/fihnjjcciajhdojfnbdddfaoknhalnja)\n\n- [Don't add custom search engines](https://chrome.google.com/webstore/detail/dont-add-custom-search-en/dnodlcololidkjgbpeoleabmkocdhacc?hl=en)\n\n- [History Blocker by Site](https://chromewebstore.google.com/detail/history-blocker-by-site/keamekimefemnbgegbfkdkmbomaahfai?pli=1) (see [this](https://superuser.com/questions/1684345/delete-translate-google-com-from-chrome-history))\n\n- [Pop up blocker for Chrome - Poper Blocker](https://chrome.google.com/webstore/detail/pop-up-blocker-for-chrome/bkkbcggnhapdmkeljlodobbkopceiche?hl=en)\n\n- [uBlacklist](https://chrome.google.com/webstore/detail/ublacklist/pncfbmialoiaghdehhbnbhkkgmjanfhe) in conjuction with [ublacklist-stackoverflow-translation](https://github.com/arosh/ublacklist-stackoverflow-translation)\n\n- [Ghostery – Privacy Ad Blocker](https://chrome.google.com/webstore/detail/ghostery-%E2%80%93-privacy-ad-blo/mlomiejdfkolichcflejclcbmpeaniij)\n\n## YouTube extensions\n\n- [Return YouTube Dislike](https://chromewebstore.google.com/detail/return-youtube-dislike/gebbhagfogifgggkldgodflihgfeippi)\n\n- [SponsorBlock](https://chromewebstore.google.com/detail/sponsorblock-for-youtube/mnjggcdmjocbbbhaepdhchncahnbgone): skips sponsorships, intros, and reminders.\n\n- [PocketTube](https://chromewebstore.google.com/detail/pockettube-youtube-subscr/kdmnjgijlmjgmimahnillepgcgeemffb): groups subscriptions into collections.\n\n- [Ad Auto-skipper](https://chromewebstore.google.com/detail/youtube-ad-auto-skipper/lokpenepehfdekijkebhpnpcjjpngpnd)\n\n## Other useful extensions\n\n- [Privacy Badger](https://chrome.google.com/webstore/detail/privacy-badger/pkehgijcmpdhfbdbbnkijodmdjhbjlgp)\n\n- [Keepa - Amazon Price Tracker](https://chrome.google.com/webstore/detail/keepa-amazon-price-tracke/neebplgakaahbhdphmkckjjcegoiijjo?hl=en)\n\n- [Save to Pocket](https://chrome.google.com/webstore/detail/save-to-pocket/niloccemoadcdkdjlinkgdfekeahmflj?hl=en)\n\n- [Rememberry](https://chromewebstore.google.com/detail/rememberry-translate-and/dipiagiiohfljcicegpgffpbnjmgjcnf): translates selected text to any language.\n\n- [Disable keyboard shortcuts](https://chromewebstore.google.com/detail/disable-keyboard-shortcut/aidbmcboeighgdnilpdljbedbbiocphj) (used to disable `Ctrl+D` to bookmark the current page, which is often pressed accidentally)\n"
  },
  {
    "path": "Chrome/export.js",
    "content": "(function exportSEs() {\n  /* Auxiliary function to download a file with the exported data */\n  function downloadData(filename, data) {\n    const file = new File([data], { type: \"text/json\" });\n    const elem = document.createElement(\"a\");\n    elem.href = URL.createObjectURL(file);\n    elem.download = filename;\n    elem.click();\n  }\n\n  /* Actual search engine export magic */\n  settings.SearchEnginesBrowserProxyImpl.prototype\n    .getSearchEnginesList()\n    .then(searchEngines => {\n      downloadData(\"search_engines.json\", JSON.stringify(searchEngines.others));\n    });\n})();\n"
  },
  {
    "path": "Chrome/import.js",
    "content": "(async function importSEs() {\n  /* Auxiliary function to open a file selection dialog */\n  function selectFileToRead() {\n    return new Promise(resolve => {\n      const input = document.createElement(\"input\");\n      input.setAttribute(\"type\", \"file\");\n      input.addEventListener(\n        \"change\",\n        e => {\n          resolve(e.target.files[0]);\n        },\n        false\n      );\n      input.click();\n    });\n  }\n\n  /* Auxiliary function to read data from a file */\n  function readFile(file) {\n    return new Promise(resolve => {\n      const reader = new FileReader();\n      reader.addEventListener(\"load\", e => {\n        resolve(e.target.result);\n      });\n      reader.readAsText(file);\n    });\n  }\n\n  const file = await selectFileToRead();\n  const content = await readFile(file);\n  const searchEngines = JSON.parse(content);\n  searchEngines.forEach(({ name, keyword, url }) => {\n    /* Actual search engine import magic */\n    chrome.send(\"searchEngineEditStarted\", [-1]);\n    chrome.send(\"searchEngineEditCompleted\", [name, keyword, url]);\n  });\n})();\n"
  },
  {
    "path": "Chrome/marco_search_engines.json",
    "content": "[\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"YouTube\",\n    \"iconURL\": \"https://s.ytimg.com/yts/img/favicon_32-vflOogEID.png\",\n    \"id\": 31,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"y\",\n    \"modelIndex\": 2,\n    \"name\": \"Search YouTube\",\n    \"url\": \"https://www.youtube.com/results?search_query=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Stack Overflow\",\n    \"iconURL\": \"https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico?v=4f32ecc8f43d\",\n    \"id\": 75,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"so\",\n    \"modelIndex\": 4,\n    \"name\": \"Stack Overflow\",\n    \"url\": \"http://stackoverflow.com/search?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Google Images\",\n    \"iconURL\": \"https://www.google.com/favicon.ico\",\n    \"id\": 79,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"gi\",\n    \"modelIndex\": 5,\n    \"name\": \"Search Google Images\",\n    \"url\": \"https://www.google.com/search?site=&tbm=isch&source=hp&biw=1678&bih=899&q=%s&=&=&oq=&gs_l=\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Google Maps\",\n    \"id\": 95,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"m\",\n    \"modelIndex\": 6,\n    \"name\": \"Search Google Maps\",\n    \"url\": \"http://maps.google.com/maps?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Wikipedia (en)\",\n    \"iconURL\": \"https://en.wikipedia.org/static/favicon/wikipedia.ico\",\n    \"id\": 98,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"wen\",\n    \"modelIndex\": 7,\n    \"name\": \"Wikipedia (en)\",\n    \"url\": \"https://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Thesaurus\",\n    \"iconURL\": \"https://www.thesaurus.com/assets/favicon-54545f5303fccb956af394ac10f1655d.png\",\n    \"id\": 100,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"th\",\n    \"modelIndex\": 8,\n    \"name\": \"Thesaurus\",\n    \"url\": \"http://www.thesaurus.com/browse/%s?s=t\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Urban Dictionary\",\n    \"iconURL\": \"https://www.urbandictionary.com/favicon.ico\",\n    \"id\": 142,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"ud\",\n    \"modelIndex\": 9,\n    \"name\": \"Urban Dictionary\",\n    \"url\": \"http://www.urbandictionary.com/define.php?term=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"amazon.com\",\n    \"iconURL\": \"https://www.amazon.com/favicon.ico\",\n    \"id\": 159,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"acom\",\n    \"modelIndex\": 10,\n    \"name\": \"amazon.com\",\n    \"url\": \"https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"thingiverse.com\",\n    \"iconURL\": \"https://cdn.thingiverse.com/site/img/favicons/favicon-32x32.png\",\n    \"id\": 170,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"tv\",\n    \"modelIndex\": 12,\n    \"name\": \"thingiverse.com\",\n    \"url\": \"https://www.thingiverse.com/search?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Super User\",\n    \"iconURL\": \"https://cdn.sstatic.net/Sites/superuser/img/favicon.ico?v=29b26120d2c5\",\n    \"id\": 176,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"su\",\n    \"modelIndex\": 13,\n    \"name\": \"Super User\",\n    \"url\": \"http://superuser.com/search?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"AlternativeTo\",\n    \"iconURL\": \"http://alternativeto.net/favicon.ico\",\n    \"id\": 184,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"alt\",\n    \"modelIndex\": 15,\n    \"name\": \"AlternativeTo Software\",\n    \"url\": \"http://alternativeto.net/browse/search/?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Google Drive\",\n    \"iconURL\": \"https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico\",\n    \"id\": 185,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"d\",\n    \"modelIndex\": 16,\n    \"name\": \"Google Drive\",\n    \"url\": \"https://drive.google.com/drive/search?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"GitHub\",\n    \"iconURL\": \"https://github.githubassets.com/favicon.ico\",\n    \"id\": 195,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"gh\",\n    \"modelIndex\": 17,\n    \"name\": \"GitHub\",\n    \"url\": \"https://github.com/search?q=%s&ref=opensearch\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Aliexpress\",\n    \"iconURL\": \"https://ae01.alicdn.com/images/eng/wholesale/icon/aliexpress.ico\",\n    \"id\": 220,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"ali\",\n    \"modelIndex\": 18,\n    \"name\": \"Aliexpress Shopping\",\n    \"url\": \"http://www.aliexpress.com/wholesale?SearchText=%s&opensearch=true\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Gist\",\n    \"iconURL\": \"https://github.githubassets.com/favicon.ico\",\n    \"id\": 224,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"gist\",\n    \"modelIndex\": 19,\n    \"name\": \"Gist\",\n    \"url\": \"https://gist.github.com/search?q=%s&ref=opensearch\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"IMDb\",\n    \"iconURL\": \"https://m.media-amazon.com/images/G/01/imdb/images/desktop-favicon-2165806970._CB484110913_.ico\",\n    \"id\": 228,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"im\",\n    \"modelIndex\": 20,\n    \"name\": \"IMDb\",\n    \"url\": \"http://www.imdb.com/find?s=all&q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"amazon.co.uk\",\n    \"iconURL\": \"https://www.amazon.co.uk/favicon.ico\",\n    \"id\": 247,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"auk\",\n    \"modelIndex\": 21,\n    \"name\": \"amazon.co.uk\",\n    \"url\": \"https://www.amazon.co.uk/s/ref=nb_sb_noss/260-3973365-6318214?url=search-alias%3Daps&field-keywords=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Chocolatey\",\n    \"iconURL\": \"https://chocolatey.org/favicon.ico\",\n    \"id\": 251,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"cho\",\n    \"modelIndex\": 22,\n    \"name\": \"Chocolatey\",\n    \"url\": \"https://chocolatey.org/packages?q=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Vikipeedia (et)\",\n    \"iconURL\": \"https://et.wikipedia.org/static/favicon/wikipedia.ico\",\n    \"id\": 256,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"wet\",\n    \"modelIndex\": 24,\n    \"name\": \"Vikipeedia (et)\",\n    \"url\": \"https://et.wikipedia.org/w/index.php?title=Eri:Otsimine&search=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Steam\",\n    \"iconURL\": \"https://store.steampowered.com/favicon.ico\",\n    \"id\": 264,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"steam\",\n    \"modelIndex\": 26,\n    \"name\": \"store.steampowered.com\",\n    \"url\": \"https://store.steampowered.com/search/?snr=1_4_4__12&term=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"amazon.de\",\n    \"iconURL\": \"https://www.amazon.de/favicon.ico\",\n    \"id\": 284,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"ade\",\n    \"modelIndex\": 27,\n    \"name\": \"amazon.de\",\n    \"url\": \"https://www.amazon.de/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"ebay.co.uk\",\n    \"iconURL\": \"https://www.ebay.co.uk/favicon.ico\",\n    \"id\": 285,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"euk\",\n    \"modelIndex\": 28,\n    \"name\": \"ebay.co.uk\",\n    \"url\": \"https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=%s&_sacat=0\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Music-Map\",\n    \"iconURL\": \"https://www.music-map.com/favicon.ico\",\n    \"id\": 287,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"mumap\",\n    \"modelIndex\": 29,\n    \"name\": \"music-map.com\",\n    \"url\": \"https://www.music-map.com/map-search.php?f=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Google Play Store\",\n    \"iconURL\": \"https://www.gstatic.com/android/market_images/web/favicon_v2.ico\",\n    \"id\": 294,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"app\",\n    \"modelIndex\": 30,\n    \"name\": \"Google Play Store\",\n    \"url\": \"https://play.google.com/store/search?q=%s&c=apps\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"amazon.it\",\n    \"iconURL\": \"https://www.amazon.it/favicon.ico\",\n    \"id\": 24,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"ait\",\n    \"modelIndex\": 1,\n    \"name\": \"amazon.it\",\n    \"url\": \"http://www.amazon.it/s/ref=nb_sb_noss?__mk_it_IT=%C5M%C5%u017D%D5%D1&url=search-alias%3Daps&field-keywords=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"ebay.it\",\n    \"iconURL\": \"https://www.ebay.it/favicon.ico\",\n    \"id\": 263,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"eit\",\n    \"modelIndex\": 25,\n    \"name\": \"ebay.it\",\n    \"url\": \"https://www.ebay.it/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=%s&_sacat=0\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Trovaprezzi\",\n    \"iconURL\": \"https://a3.trovaprezzi.it/assets/assets/it/favicon_32x32-342b3e6a49cc618f396e167f687360be2ab61d7cdaf82579e4758bf47a2c178a.ico\",\n    \"id\": 168,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"tp\",\n    \"modelIndex\": 11,\n    \"name\": \"trovaprezzi.it\",\n    \"url\": \"https://www.trovaprezzi.it/categoria.aspx?id=-1&libera=%s\",\n    \"urlLocked\": false\n  },\n  {\n    \"canBeDefault\": true,\n    \"canBeEdited\": true,\n    \"canBeRemoved\": true,\n    \"default\": false,\n    \"displayName\": \"Wikipedia (it)\",\n    \"id\": 68,\n    \"isOmniboxExtension\": false,\n    \"keyword\": \"wit\",\n    \"modelIndex\": 3,\n    \"name\": \"Wikipedia (it)\",\n    \"url\": \"http://it.wikipedia.org/w/index.php?search=%s&title=Speciale%3ARicerca\",\n    \"urlLocked\": false\n  }\n]\n"
  },
  {
    "path": "Docker/.bashrc",
    "content": "# Docker\nalias d-clean='docker system prune'\nalias d-list='docker container ls -a --format \"table {{.ID}}\\t{{.Image}}\\t{{.Names}}\\t{{.Status}}\"'\nalias d-stop-all='docker stop $(docker container ls -q)'\n\n# Docker Compose\nalias dc-start='docker-compose up -d'\nalias dc-build='docker-compose build'\nalias dc-stop='docker-compose down --remove-orphans'\nalias dc-restart='docker-compose up -d --force-recreate'\nalias dc-rebuild='docker-compose down --remove-orphans && docker-compose build && docker-compose up -d'\n"
  },
  {
    "path": "Docker/Dockerfile",
    "content": "FROM alpine:latest\n\nRUN set -xe \\\n    # Install build tools, libraries and utilities\n    && apk add --no-cache --virtual .build-deps \\\n    gnupg \\\n    wget \\\n    # Contain file system pollution\n    && TMP=\"$(mktemp -d)\" && cd \"$TMP\" \\\n    # Check integrity of the signature by signing the public key\n    # retrieved from a key server imported using the key fingerprint\n    && gpg --keyserver pgp.mit.edu --recv-keyserver B0F4253373F8F6F510D42178520A9993A1C052F8 \\\n    # Download, verify and unpack artifacts\n    && wget --show-progress http://download/file.tar.gz \\\n    && wget --show-progress http://download/file.tar.gz.asc \\\n    && gpg --verify file.tar.gz.asc \\\n    && tar -xf file.tar.gz \\\n    # Build and install\n    # Clean up\n    && cd / && rm -rf \"$TMP\" \\\n    && apk del .build-deps \\\n    # Forward logs to Docker logs cli\n    && ln -sf /dev/stdout ...logs/output.log \\\n    ln -sf /dev/stderr ...logs/error.log\n\n# Copy static content and configuration from host to container\nCOPY from to\n\n# Stop the container gracefully\nSTOPSIGNAL SIGQUIT\n\n# Expose port\nEXPOSE 1234\n\n# Define entrypoint and default parameters\nENTRYPOINT [\"\"] \nCMD [\"\",\"\"]\n"
  },
  {
    "path": "Docker/README.md",
    "content": "# Docker\n\n_Table of Contents_\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Basic operations](#basic-operations)\n- [Customize containers list](#customize-containers-list)\n- [Check if Docker Engine is running](#check-if-docker-engine-is-running)\n- [Docker compose](#docker-compose)\n  - [Basic operations](#basic-operations-1)\n- [Useful links](#useful-links)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n\n## Basic operations\n\n```sh\n## List running containers (formerly \"docker ps\")\ndocker container ls\n\n# List all containers, running and stopped\ndocker container ls -a\n\n# Check whether one specific container is running\ndocker container ls -a | grep container_name\n\n# Stop all running containers\ndocker stop $(docker ps -q)\n\n# List images\ndocker image ls\n\n# List dangling images\ndocker images -f dangling=true\n\n# Remove dangling images\ndocker image prune\n\n# Remove dangling and unused images\ndocker image prune -a\n\n# Follow the logs of a running container\ndocker logs -f <container_name>\n\n# Enter and open a shell in a running container\ndocker exec -it <container_name> bash\n\n# Print a list of the environment variables of a running container\ndocker exec -it <container_name> env\n\n# Run a SQL query in a Postgres container\ndocker exec container-name bash -c 'psql -d database-name -U username --command \"select * from users;\"'\n\n# Inspect an image (use /bin/sh for alpine images)\ndocker image pull <image_name>\ndocker run -t -i <image_id> /bin/bash\n```\n\n## Customize containers list\n\n```sh\n# Show id, image, name and status of all containers\ndocker container ls -a --format \"table {{ .ID }}\\t{{ .Image }}\\t{{ .Names }}\\t{{ .Status }}\"\n\n# Show name, status and ports of all containers\ndocker container ls -a --format \"table {{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}\"\n\n# Filter containers by name\ndocker container ls -f name=container-name\n```\n\nSet a format to use it as a default in your `~/.docker/config.json`:\n\n```js\n{ \"psFormat\": \"table {{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}\" }\n```\n\n- [Source](https://github.com/moby/moby/issues/7477)\n\n## Check if Docker Engine is running\n\nRun:\n\n```sh\ndocker version\n```\n\nIf docker **is running** you will see:\n\n```sh\nClient: Docker Engine - Community\n Version:           ...\n [omitted]\n\nServer: Docker Engine - Community\n Engine:\n  Version:          ...\n [omitted]\n```\n\nIf docker **is not running** you will see:\n\n```sh\nClient: Docker Engine - Community\n Version:           ...\n [omitted]\n\nError response from daemon: Bad response from Docker engine\n```\n\n## Docker compose\n\nDocker Compose is a way to configure docker containers together as a logical unit, define resources they all share and run containers together.\n\nSome of the advantages include:\n\n- it keeps track of the container it starts (via labels). If you re-run `docker-compose up -d` without changes it won’t try to recreate any containers. If on the other hand you change a service a `docker-compose up -d` will recreate only that service and any service that depends on it.\n\n- with `logs` you can look at outputs of all involved containers merged together\n\n- `ls` covers just the containers stemming from the given compose-file.\n\n### Basic operations\n\n```sh\n# build\ndocker-compose build\n\n# start\ndocker-compose up -d\n\n# stop\ndocker-compose down --remove-orphans\n\n# restart\ndocker-compose up -d --force-recreate\n\n# rebuild\ndocker-compose down --remove-orphans && docker-compose build && docker-compose up -d\n\n# clean up stale images\ndocker system prune\n\n# prevent containers to start automatically\ndocker update --restart=no $(docker container ls -a -q)\n\n# make one container start automatically\ndocker update --restart=always container_name\n```\n- [Restart policies (--restart)](https://docs.docker.com/engine/reference/run/#restart-policies---restart)\n\n## Useful links\n\n- [Slim](https://github.com/slimtoolkit/slim)\n"
  },
  {
    "path": "ExifTool/README.md",
    "content": "# ExifTool\n\n[ExifTool](https://exiftool.org/) is a library and a command-line application for reading, writing and editing meta information.\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Shift 2 hours earlier the time of the photos in the current folder](#shift-2-hours-earlier-the-time-of-the-photos-in-the-current-folder)\n- [Set a specific date for all photos in the current folder, without changing the time](#set-a-specific-date-for-all-photos-in-the-current-folder-without-changing-the-time)\n- [Rename image and video files by date and time](#rename-image-and-video-files-by-date-and-time)\n- [Move or copy image files into folders by year and month](#move-or-copy-image-files-into-folders-by-year-and-month)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Shift 2 hours earlier the time of the photos in the current folder\n\n```powershell\nexiftool \"-DateTimeOriginal-=0:0:0 2:0:0\" .\n```\n\n## Set a specific date for all photos in the current folder, without changing the time\n\nIn powershell:\n```powershell\nGet-ChildItem *.jpg | ForEach-Object {\n    $currentDateTime = exiftool -s -s -s -DateTimeOriginal $_.Name\n    $timePart = $currentDateTime.Split(' ')[1]\n    exiftool -DateTimeOriginal=\"2006:10:16 $timePart\" $_.Name\n    Write-Host \"Updated: $($_.Name)\"\n}\n```\n\n## Rename image and video files by date and time\n\nRename image and video files according to their EXIF capture date, using `YYYY-MM-DD HH.MM.SS.ext` format. Files shot within the same second get copy number added (`-1`, `-2`, etc.). Some MOV files require a different date, so we run exiftool 3 times.\n\n```powershell\n# Exclude MOV files and rename the image files with <CreateDate>\nexiftool --ext MOV '-filename<CreateDate' -d '%Y-%m-%d %H.%M.%S%%-c.%%le' .\n\n# Target MOV files and rename them with MediaCreateDate (for iPhone videos)\nexiftool -ext MOV '-filename<ContentCreateDate' -d '%Y-%m-%d %H.%M.%S%%-c.%%le' .\n\n# Target MOV files and rename them with DateTimeOriginal (for Fuji camera videos)\nexiftool -ext MOV '-filename<DateTimeOriginal' -d '%Y-%m-%d %H.%M.%S%%-c.%%le' .\n```\n\n`--ext` EXCLUDES files with the extension.\n\n`-ext` INCLUDES files with that extension.\n\nSee:\n\n- [Rename image files according to their creation date](https://ninedegreesbelow.com/photography/exiftool-commands.html#rename)\n- [Common Date Format Codes](https://exiftool.org/filename.html)\n- [Exiftool Canonize](https://gist.github.com/jmuspratt/3680d45b0c12f8b32093)\n\n## Move or copy image files into folders by year and month\n\n```powershell\n# Move\nexiftool '-Directory<CreateDate' -d './destination/folder/%Y/%m %B' -r ./source/folder\n\n# Copy\nexiftool -o . '-Directory<CreateDate' -d './destination/folder/%Y/%m %B' -r ./source/folder\n```\n\nSee [Writing \"FileName\" and \"Directory\" tags](https://exiftool.org/filename.html).\n"
  },
  {
    "path": "Git/.gitconfig",
    "content": "[alias]\n    delete-last-commit = reset --hard HEAD~1\n    undo-last-commit = reset HEAD~1\n    stage-all-and-commit = add . && git commit -m\n    reset-and-clean = reset --hard && git clean -f -d\n    stash-keep = \"!git stash store $(git stash create)\"\n\n    list-local-branches = branch\n    delete-local-branch = branch -d\n    new-branch = checkout master && git pull && checkout -b\n    prune-branches = \"!git branch --merged | grep -v \"\\\\*\" | xargs -n 1 git branch -d\"\n    update = pull --rebase\n\n    log-pretty = log --oneline --graph --decorate\n    go-to-master = checkout master && git pull\n"
  },
  {
    "path": "Git/README-template.md",
    "content": "# `<project_name>`\n\n<project_name> is a <utility/tool/service/application> that allows <target_audience> to do <action/task>.\n\n_Additional line of information text about what the project does, should be up to 3 sentences._\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- Generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Tech stack](#tech-stack)\n- [Prerequisites](#prerequisites)\n- [Setup](#setup)\n- [Running](#running)\n- [Testing](#testing)\n- [Contributing](#contributing)\n- [Deploying](#deploying)\n- [Monitoring](#monitoring)\n- [Troubleshooting](#troubleshooting)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Tech stack\n\n_List all the frameworks, libraries and tools used by this project_\n\n## Prerequisites\n\n_List all the software tools and their versions required to set up and run this project_\n\n## Setup\n\n_Explain how to set up this project locally for the first time_\n\n## Running\n\n_Explain how to run this project locally each time_\n\n## Testing\n\n_Explain how the tests are structured, which ones should be run locally and how_\n\n## Contributing\n\n_Explain how to contribute to this repository, conventions, guidelines and code review process_\n\n## Deploying\n\n_Explain how to deploy to staging and to production_\n\n## Monitoring\n\n_List the possible ways to monitor the health status of this project_\n\n## Troubleshooting\n\n_List here all the problems found by any developer while working on this project and their solutions, each one in a different subsection_\n"
  },
  {
    "path": "Git/README.md",
    "content": "# git\n\nTable of Contents\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- Generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [First setup](#first-setup)\n- [Branch operations](#branch-operations)\n  - [Merge remote changes to your local changes](#merge-remote-changes-to-your-local-changes)\n- [Commits operations](#commits-operations)\n- [Stash operations](#stash-operations)\n- [Remove/delete local untracked files](#removedelete-local-untracked-files)\n- [Revert a PR merge and delete its commits from master history](#revert-a-pr-merge-and-delete-its-commits-from-master-history)\n- [Revert a PR merge to master](#revert-a-pr-merge-to-master)\n- [Revert / undo / delete a pushed tag](#revert--undo--delete-a-pushed-tag)\n- [Revision history](#revision-history)\n  - [Find who added and subtracted the most lines in a repository](#find-who-added-and-subtracted-the-most-lines-in-a-repository)\n  - [Display the history of changes of the lines containing a specific string](#display-the-history-of-changes-of-the-lines-containing-a-specific-string)\n  - [Display a compact list of commits](#display-a-compact-list-of-commits)\n- [Search for a term in the commit history](#search-for-a-term-in-the-commit-history)\n- [Enable git bash aliases auto completion](#enable-git-bash-aliases-auto-completion)\n- [Persist the passphrase through restarts](#persist-the-passphrase-through-restarts)\n  - [On *nix systems](#on-nix-systems)\n  - [On Windows](#on-windows)\n- [Resources](#resources)\n- [Tools](#tools)\n- [GitHub](#github)\n  - [Find the most active forks of a repository](#find-the-most-active-forks-of-a-repository)\n  - [Merging an upstream repository into your fork](#merging-an-upstream-repository-into-your-fork)\n  - [Navigate to the first commit in a GitHub repository](#navigate-to-the-first-commit-in-a-github-repository)\n  - [Change base branch](#change-base-branch)\n  - [Resurrect a PR displaying unknown repository after the fork was deleted](#resurrect-a-pr-displaying-unknown-repository-after-the-fork-was-deleted)\n  - [Tools](#tools-1)\n  - [Show commits between two dates](#show-commits-between-two-dates)\n  - [GitHub Learning Lab](#github-learning-lab)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## First setup\n\n```powershell\ngit config --global user.name \"Your name here\"\ngit config --global user.email \"your_email@example.com\"\ngit config --global core.editor code\nssh-keygen -t rsa -C \"your_email@example.com\"\n# Copy the content of the public key to your clipboard, for example in PowerShell:\nGet-Content C:\\Users\\user\\.ssh\\id_rsa.pub | Set-Clipboard\n```\n\n1. [GitHub Account Settings > SSH Keys](https://github.com/settings/ssh)\n1. Press `New SSH Key`\n1. Title = your computer name\n1. Key = paste the clipboard content\n\nTest the connection with:\n\n```sh\nssh -T git@github.com\n```\n\n## Branch operations\n\n```sh\n# List local branches\ngit branch\n\n# Get the current branch name\ngit rev-parse --abbrev-ref HEAD\n\n# Delete local branch\ngit branch -d local-branch-name\n\n# Delete all local branches except master or main\ngit branch | grep -v \"master\" | grep -v \"main\" | xargs git branch -D\n\n# Reset your local branch\ngit fetch origin && git reset --hard && git clean -f -d\n\n# Clone remote branch locally\n   # with modern Git (>= 1.6.6)\n   git fetch && git checkout remote-branch-name\n   \n   # with old Git (< 1.6.6)\n   git fetch && git checkout -b remote-branch-name HEAD\n\n# Merge master into the current branch\ngit pull origin master\n```\n\n### Merge remote changes to your local changes\n\nWhen working in a busy branch, with more than one contributor, you usually synchronize your code by pulling after every commit or so, possibly several times a day. By using simply `git pull` you are actually issuing `git fetch` + `git merge` commands, which will result with an extra merge commit in your history.\n\nTo keep the repository clean use _rebase_:\n\n- terminal: `git pull --rebase`\n\n- Visual Studio Code > : Source Control Manager (SCM) > _Pull (Rebase)_\n\n- IntelliJ IDEA > _Rebase current onto selected_ (master)\n\nor add an alias to your `~/.gitconfig`, for example:\n\n```sh\n[alias]\n    update = pull --rebase\n```\n\nor set rebase as the default using:\n\n```sh\ngit config branch.autosetuprebase always \n```\n\nusing `git pull --no-rebase` when you want to use merge instead.\n\n## Commits operations\n\n```sh\n# Undo the last local (not pushed) commit, keeping the changes\ngit reset HEAD~1\n\n# Delete the last local (not pushed) commit and all uncommited changes\ngit reset --hard HEAD~1\n\n# Undo an old commit, keeping all commits that came after that one\ngit revert <COMMIT_SHA>\n\n# Restore your project to an old commit, undoing/deleting all the commits that came afterwards\ngit reset --hard <COMMIT_SHA>\n\n# Commit all changes\ngit commit -a\n```\n\n## Stash operations\n\n```sh\n# Stash your changes and untracked files\ngit stash -u\n\n# View a summary of your last stash\ngit stash show\n\n# Pass the -p option (or --patch) to view the full diff\ngit stash show -p\n\n# View your untracked files in your last stash\ngit show stash^3\n\n# Copy your last stash to a file\ngit stash show -p > modifiedfile\ngit show stash^3 > untrackedfile\n\n# Put a patch file to the stash\ngit apply modifiedfile\ngit apply untrackedfile\n\n# Stash without removing the changes\ngit stash store $(git stash create) -m \"Stash commit message\"\n\n# Stash a single file\ngit stash push path/to/file --keep-index\n```\n\n## Remove/delete local untracked files\n\n```bash\n# Run this command first to check which files will be removed:\ngit clean -n\n\n# When you are sure you want to remove then run:\ngit clean -f -d\n```\n\n## Revert a PR merge and delete its commits from master history\n\nWarning! This operation is potentially harmful, it will delete also all the merges of other PRs done in between:\n\n```shell\ngit reset --hard <COMMIT_SHA>\ngit status\ngit push -f origin master\n```\n\n## Revert a PR merge to master\n\nAfter reverting a PR on master (i.e., it was mistakenly merged the first time), to produce a clean history for the second attempt at a PR:\n\n1. Temporarily move master (so that subsequent rebase commits are not dropped by Git)\n    \n    ```bash\n    git checkout master\n    git revert --mainline 1 <PR_SHA>\n    ```\n\n1. Rebase to reattach old commits to latest master\n\n    ```bash\n    git checkout <BRANCH>\n    git rebase --onto master <FIRST_COMMIT_SHA>~\n    git checkout -b <NEW_BRANCH> # This will require you to create a new PR.  You should no longer use <BRANCH> but instead use <NEW_BRANCH> going forward.\n    ```\n  \n1. Restore master (as it was temporarily move to help with rebase)\n\n    ```bash\n    git checkout master\n    git reset --hard origin/master\n    ```\n\n## Revert / undo / delete a pushed tag\n\n```bash\n# delete local tag '1.2.3'\ngit tag -d 1.2.3\n# delete remote tag '1.2.3'\ngit push origin :refs/tags/1.2.3\n```\n\n## Revision history\n\n### Find who added and subtracted the most lines in a repository\n\nWith [git-guilt](https://bitbucket.org/tpettersen/git-guilt/src/master/):\n\n```\ngit-guilt `git log --until=\"3 years ago\" --format=\"%H\" -n 1` HEAD \n```\n\n### Display the history of changes of the lines containing a specific string\n\n```\ngit log -S \"specific string\" --patch --reverse\n```\n\n### Display a compact list of commits\n\n```\ngit log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\n```\n\nOr add it as `lg` alias:\n\n```\ngit config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\"\n```\n\n## Search for a term in the commit history\n\n```sh\ngit log -G\"search term\" \n```\n\nTo see the changes in the commits:\n\n```sh\ngit log -G\"search term\" --patch  \n``` \n\n## Enable git bash aliases auto completion\n\nOn most distributions, git completion script is installed when you install git. You just need to add this line to your `~/.bashrc`:\n\n```sh\nsource /etc/bash_completion.d/git\n# or (in ArchLinux for example)\nsource /usr/share/bash-completion/completions/git\n```\n\n## Persist the passphrase through restarts\n\n### On *nix systems\n\n```sh\n# Append to ~/.bashrc\neval `ssh-agent -s`\n\n# Run\nsource ~/.bashrc\n\n# Store the passphrase in your keychain with the `-K` option (`-k` for Ubuntu):\nssh-add -K ~/.ssh/id_rsa\n```\n\n### On Windows\n\n```sh\n# 1. Install OpenSSH Client:\nGet-WindowsCapability -Online | Where-Object { $_.Name -like \"OpenSSH.Client*\" } | Add-WindowsCapability -Online | Out-Null\n\n# 2. Set the service \"OpenSSH Authentication Agent\" to start automatically:\nGet-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service\n\n# 3. Add the private key\nssh-add C:\\Users\\YourUsername\\.ssh\\id_rsa\n```\n\n## Resources\n\n- [git-tips](https://github.com/git-tips/tips)\n- [Githug](https://github.com/Gazler/githug)\n- [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)\n- [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716)\n\n## Tools\n\n- [git for Windows](https://chocolatey.org/packages/git)\n- [TortoiseGit](https://chocolatey.org/packages/TortoiseGit)\n\n## GitHub\n\n### Find the most active forks of a repository\n\n- [active-forks](https://techgaun.github.io/active-forks/index.html)\n\n### Merging an upstream repository into your fork\n\n```powershell\ngit pull https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME\n```\n\n- [Source](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork)\n\n### Navigate to the first commit in a GitHub repository\n\n1. take a note of the number of commits in the repository (say N)\n1. calculate X = N-36\n1. go to the list of commits\n1. click on the \"Older\" button at the bottom of the page\n1. replace +Y suffix in the URL with +X\n\n### Change base branch\n\n- [Changing the base branch of a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request)\n\n### Resurrect a PR displaying unknown repository after the fork was deleted\n\n```sh\ngit fetch origin refs/pull/123/head:foo\n``` \n\nSubstitute (if necessary) `origin` for the remote pointing at the target repo, `123` for the PR number, and `foo` for the name of the local branch you want created to point to the head of the PR.\n\nThen you can simply `git checkout foo`, close the stale PR, and resubmit a new one which supersedes it.\n\nSources: [this](https://github.com/isaacs/github/issues/168#issuecomment-374201226) and [this](https://gist.github.com/piscisaureus/3342247).\n\n### Tools\n\n- [Octo Mate](https://chrome.google.com/webstore/detail/octo-mate/baggcehellihkglakjnmnhpnjmkbmpkf)\n\n### Show commits between two dates\n\nAppend `?since=2018-05-31&until=2018-07-01`.\n\nExample:\n```\nhttps://github.com/github/linguist/commits/master?since=2018-05-31&until=2018-07-01\n``` \n\nSource: [this](https://stackoverflow.com/a/42472394/1422096).\n\n### GitHub Learning Lab\n\nLearn how to use GitHub with interactive courses designed for beginners and experts:\n\n- https://skills.github.com/\n"
  },
  {
    "path": "Go/README.md",
    "content": "# Go\n\nCreated by a small team at Google in 2007, composed by Robert Griesemer, Rob Pike, and Ken Thompson. Ken Thomson is the creator of the B programming language, which was the direct predecessor of the C programming language. He also created the Unix operating system, and the UTF-8 character encoding. Rob Pike is the creator of the Plan 9 operating system, and the Limbo programming language. Robert Griesemer is the creator of the Java HotSpot virtual machine, and the Java programming language.\n\nGo was created to resolve the problems of the existing languages, such as the slow build time of C++, the verbosity of Java and complexity of its type system, the slow performance of Python and JavaScript and the lack of good concurrency support in all of them. These languages where invented at a time when computers didn't have a lot of memory, and the programs typically ran on a single core. Go is a strong and statically typed, compiled language in the tradition of C, with the added benefits of memory safety, garbage collection, structural typing, and CSP-style concurrency.\n\nCSP-style concurrency (Communicating Sequential Processes) is a concurrency model that was developed by Tony Hoare in the 1970s. It is based on the idea of having concurrent processes communicate with each other by sending and receiving messages. This is in contrast to the shared memory model of concurrency, where concurrent processes communicate with each other by reading and writing to shared memory. The shared memory model of concurrency is the model used by C, C++, and Java. The CSP-style concurrency model is the model used by Go, Erlang, and Clojure.\n\nThe key features of Go are:\n- Fast compilation\n- Garbage collection\n- Built-in concurrency\n- Static typing\n- Simplicity\n- Safety\n- Built-in tooling\n\nGo has a built-in library (called \"standard library\") full of features like a testing framework, JSON and CSV encoding/decoding, html templating, http server and router, time operations and manipulation, regular expressions, cryptographic operations such as hashing and encryption, images encoding/decoding for formats like JPEG, PNG, GIF, file compression and decompression, and many more. Having such a rich standard library means that you don't have to rely on third-party libraries for many common tasks.\n\nGo is used by many companies, including Google, Facebook, Twitter, Dropbox, Docker, Kubernetes, and many more. Many popular projects are written in Go, including Docker, Kubernetes, Hugo, InfluxDB, Terraform, and many more.\n\nGo doesn't have a built-in dependency injection framework. This is because Go has a built-in dependency injection mechanism called \"interfaces\". An interface is a type that specifies a set of methods. A type that implements all the methods of an interface implements that interface. This means that you can use a type that implements an interface anywhere that interface is used. This is called \"implicit implementation\". This is in contrast to \"explicit implementation\", where you have to explicitly declare that a type implements an interface. Implicit implementation is a form of dependency injection, because it allows you to inject a type that implements an interface into a function or method that expects that interface.\n\nThe following notes are based on the current version of Go, which is [1.20.4](https://tip.golang.org/doc/go1.20), as of May 2023.\n\n*Table of contents*\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Installation](#installation)\n- [Setup](#setup)\n- [Running and compiling](#running-and-compiling)\n- [Type inference](#type-inference)\n- [Initial values](#initial-values)\n- [Arrays](#arrays)\n- [Slices](#slices)\n- [Maps](#maps)\n- [Loops](#loops)\n- [Functions](#functions)\n- [Structs](#structs)\n- [Generics (WIP)](#generics-wip)\n- [Fuzzing (WIP)](#fuzzing-wip)\n- [Testing (WIP)](#testing-wip)\n- [Naming conventions](#naming-conventions)\n- [IDEs](#ides)\n- [Resources](#resources)\n  - [YouTube channels and playlists](#youtube-channels-and-playlists)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nGo can be installed on Windows, macOS, and Linux. The installation instructions for each operating system can be found at https://golang.org/doc/install.\n\nOn Windows can be installed with winget:\n\n```powershell\nwinget install --id GoLang.Go\n```\n\n## Setup\n\nAll your projects are in the same directory called the \"workspace\", located in the user's home directory, which by default is called \"go\". You can see its location by running `go env GOPATH`. The workspace contains three subdirectories:\n\n- `src`, which contains the source files of your projects;\n- `pkg`, which contains the compiled packages;\n- `bin`, which contains the compiled binaries.\n\n## Running and compiling\n\n```sh\n# Run a Go program\ngo run <filename>\n\n# Compile a Go program and place the compiled binary in the current directory\ngo build <filename>\n\n# Compile a Go program and place the compiled binary in the bin directory of the workspace\ngo install <filename>\n```\n\n## Type inference\n\nIn Go the compiler can infer the type of a variable from its value. This is called \"type inference\". Type inference is useful because it allows you to omit the type of a variable when you declare it. This makes the code shorter and easier to read.\n\n```go\n// Standard declaration\nvar x int = 1\n\n// Shorthand declaration with type inference\nx := 1\n```\n\n## Initial values\n\nEvery type has an initial value. The initial value of a numeric type is 0, the initial value of a string type is \"\", and the initial value of a boolean type is false.\n\n```go\n// Initial values\nvar x int // 0\nvar y string // \"\"\nvar z bool // false\n```\n\n## Arrays\n\nAn array is a fixed-length sequence of elements of a single type. Once an array is created, its length is fixed. The length of an array is part of its type. This means that arrays of different lengths are of different types, and you cannot assign an array of one length to an array of a different length.\n\n```go\n// Standard declaration of an array\nvar x [3]int = [3]int{1, 2, 3}\n\n// Shorthand declaration of an array\nx := [3]int{1, 2, 3}\n```\n\n## Slices\n\nA slice is a variable-length sequence of elements of a single type. A slice is a reference type, which means that when you assign a slice to a variable or pass a slice to a function, a copy of the slice header is created and assigned or passed. The slice header contains a pointer to the underlying array, the length of the slice, and the capacity of the slice. The capacity of a slice is the maximum number of elements that the slice can hold. The length of a slice is the number of elements that the slice currently holds. The length of a slice can be changed by re-slicing the slice. The capacity of a slice cannot be changed.\n\n```go\n// Standard declaration of a slice\nvar x []int = []int{1, 2, 3}\n\n// Shorthand declaration of a slice\nx := []int{1, 2, 3}\n```\n\n## Maps\n\nMaps are unordered collections of key-value pairs. The keys of a map must be of a type that can be compared with the `==` operator. The values of a map can be of any type. The keys of a map must be unique. The values of a map can be duplicated.\n\n```go\n// Standard declaration of a map\nvar x map[string]int = map[string]int{\"one\": 1, \"two\": 2, \"three\": 3}\n\n// Shorthand declaration of a map\nx := map[string]int{\"one\": 1, \"two\": 2, \"three\": 3}\n\n// Add a key-value pair to a map\nx[\"four\"] = 4\n\n// Remove a key-value pair from a map\ndelete(x, \"four\")\n```\n\n## Loops\n\nThe `for` loop is the only loop statement in Go. It can be used to iterate over the elements of an array, slice, or map.\n\n```go\n// Iterate over the elements of an array or slice\nfor i := 0; i < len(x); i++ {\n    fmt.Println(x[i])\n}\n\n// While loop equivalent\ni := 0\nfor i < 10 {\n    fmt.Println(i)\n    i++\n}\n\n// Iterate over the elements of an array or slice with range\nfor i, value := range x {\n    fmt.Println(i, value)\n}\n\n// Iterate over the elements of a map\nfor key, value := range x {\n    fmt.Println(key, value)\n}\n```\n\n## Functions\n\nFunctions in Go are first-class values. This means that you can assign a function to a variable, pass a function to a function, and return a function from a function.\n\nFunctions can return multiple values. The type of each return value is specified after the list of parameters. If a function returns multiple values, the return statement must specify the values to return.\n\n```go\n// Standard declaration of a function\nfunc add(x int, y int) int {\n    return x + y\n}\n\n// Return multiple values\nfunc addAndSubtract(x int, y int) (int, int) {\n    return x + y, x - y\n}\n\n// Assign variables returned from a function that returns multiple values\nsum, difference := addAndSubtract(42, 13)\n\n// Return multiple values, one of which is an error\nfunc addPositives(x int, y int) (int, error) {\n    if x < 0 || y < 0 {\n        return 0, errors.New(\"x and y must be greater than 0\")\n    }\n    return x + y, nil\n}\n\n// Assign a function to a variable\nvar f func(int, int) int = addPositives\n\n// Pass a function to a function\nfunc apply(f func(int, int) int, x, y int) int {\n    return f(x, y)\n}\n\n// Return a function from a function\nfunc add(x int) func(int) int {\n    return func(y int) int {\n        return x + y\n    }\n}\n```\n\n## Structs\n\nA struct is a collection of fields. The fields of a struct can be of any type. The fields of a struct can be accessed using dot notation.\n\n```go\n// Standard declaration of a struct\ntype Person struct {\n    Name string\n    Age int\n}\n\n// Shorthand declaration of a struct\ntype Person struct {\n    Name, Age string\n}\n\n// Create a struct\np := Person{\"John Doe\", 42}\n\n// Access a field of a struct\nfmt.Println(p.Name)\n```\n\n## Generics (WIP)\n\nGo supports generics since version 1.18. Generics allow you to write functions and data structures that can be used with any type. Generics are implemented using type parameters. Type parameters are specified in square brackets after the name of the function or data structure. Type parameters are specified using the `type` keyword. Type parameters can be used as types in the function or data structure.\n\n```go\n// Generic function\nfunc add[T any](x, y T) T {\n    return x + y\n}\n\n// Generic data structure\ntype Stack[T any] struct {\n    values []T\n}\n\n// Generic method\nfunc (s *Stack[T]) Push(value T) {\n    s.values = append(s.values, value)\n}\n\n// Create a stack of ints\nvar s Stack[int]\n\n// Create a stack of strings\nvar s Stack[string]\n```\n\n## Fuzzing (WIP)\n\nFuzzing is a technique for finding bugs in software by providing random input to the software. Go has built-in support for fuzzing. To use fuzzing, you need to create a function that takes a byte slice as input and returns an integer. The function should return 1 if the input is valid and 0 if the input is invalid. The function should panic if the input is invalid. The function should not return an error. The function should not print anything to the console.\n\n```go\n// Fuzzing function\nfunc Fuzz(data []byte) int {\n    // Do something with the input\n    return 1\n}\n```\n\n## Testing (WIP)\n\nGo has built-in support for testing. To write a test, you need to create a function that takes a pointer to a testing.T as input. The function should call the testing.T.Error or testing.T.ErrorF function if the test fails. The function should call the testing.T.Fatal or testing.T.FatalF function if the test fails and the test should not continue. Tests are run using the `go test` command.\n\n```go\n// Test function\nfunc TestSomething(t *testing.T) {\n    // Do something\n    if something != somethingElse {\n        t.Error(\"something is not equal to somethingElse\")\n    }\n}\n```\n\n## Naming conventions\n\n- The name of a variable or function should be in camel case. The first letter of the name should be lowercase, e.g. `person`, `addPerson`, `getPerson`, etc.\n- The name of a boolean variable should be a question, e.g. `isPerson`, `hasPerson`, `canPerson`, `shouldPerson`, etc.\n- The name of a constant should be all uppercase, using underscores to separate words, e.g. `MAX_INT`.\n- The name of a type should be in camel case. The first letter of the name should be uppercase, e.g. `Person`.\n- The name of a package should be in lowercase, using underscores to separate words, e.g. `person_utils`.\n\n## IDEs\n\nAccording to [Go Developer Survey 2022 Q2 Results](https://go.dev/blog/survey2022-q2-results), the 3 most popular IDEs for Go are:\n\n1. [Visual Studio Code]{https://code.visualstudio.com/docs/languages/go} (used by 45% of respondents)\n2. GoLand (used by 34% of respondents)\n3. Vim/Neovim (used by 14% of respondents)\n\n## Resources\n\n- [Go by Example](https://gobyexample.com/)\n- [A Tour of Go](https://tour.golang.org/welcome/1)\n- [Effective Go](https://golang.org/doc/effective_go.html)\n- [Go Documentation](https://golang.org/doc/)\n- [Go Standard Library](https://golang.org/pkg/)\n- [Go Playground](https://play.golang.org/)\n- [Go tutorial on TutorialEdge](https://tutorialedge.net/course/golang/)\n- [All About GoLang](https://golangdocs.com/)\n- [Go tutorial on GoLangTutorial](https://golangtutorial.dev/)\n- [Go tutorial on GoLangByExample](https://golangbyexample.com/)\n- [The Go Blog](https://go.dev/blog/)\n- [Go on Twitter](https://twitter.com/golang)\n- [Go Proverbs](https://go-proverbs.github.io/)\n- [Practical Go Lessons](https://www.practical-go-lessons.com/)\n\n### YouTube channels and playlists\n\n- [Go Class, by Matt Holiday](https://www.youtube.com/playlist?list=PLoILbKo9rG3skRCj37Kn5Zj803hhiuRK6)\n- [Gopher Academy](https://www.youtube.com/channel/UCx9QVEApa5BKLw9r8cnOFEA)\n- [Anthony GG](https://www.youtube.com/@anthonygg_/videos)\n- [Building Microservices with Go, by Nic Jackson](https://youtube.com/playlist?list=PLmD8u-IFdreyh6EUfevBcbiuCKzFk0EW_)\n- [Mario Carrion](https://www.youtube.com/@MarioCarrion/videos)\n- [Rob Pike's talks](https://www.youtube.com/results?search_query=Rob+Pike%27s+talks)\n- [Golang University 101 - Learn Golang](https://www.youtube.com/watch?v=rFejpH_tAHM&list=PLEcwzBXTPUE9V1o8mZdC9tNnRZaTgI-1P&index=1)\n- [Golang University 201 - Intermediate Golang](https://www.youtube.com/watch?v=yeetIgNeIkc&list=PLEcwzBXTPUE_5m_JaMXmGEFgduH8EsuTs)\n- [Golang University 301 - Master Golang](https://www.youtube.com/playlist?list=PLEcwzBXTPUE8KvXRFmmfPEUmKoy9LfmAf)\n- [The Go Programming Language](https://www.youtube.com/@golang/videos)\n- [TutorialEdge](https://www.youtube.com/@Tutorialedge/videos)\n- [Ardan Labs](https://www.youtube.com/@ardanlabs/video)\n"
  },
  {
    "path": "Google Docs/README.md",
    "content": "# Google Docs\n\n## Format text as code\n\n### Use an add-on\n\n- [Code Blocks](https://gsuite.google.com/marketplace/app/code_blocks/100740430168)\n\n### Add a style\n\n1. Create a new script (`Tools > Script Editor`)\n\n1. Copy the following code into the editor:\n\n    ```js\n    // Add new menu item\n    function onOpen() {\n    DocumentApp.getUi()\n    .createMenu('Styles')\n    .addItem('Format Code', 'formatCode')\n    .addToUi();\n    }\n\n    // Define code styling\n    var style = {};\n    style[DocumentApp.Attribute.FONT_FAMILY] = DocumentApp.FontFamily.CONSOLAS;\n    style[DocumentApp.Attribute.FONT_SIZE] = 10;\n    style[DocumentApp.Attribute.BACKGROUND_COLOR] = \"#DDDDDD\";\n    style[DocumentApp.Attribute.FOREGROUND_COLOR] = \"#333333\";\n    style[DocumentApp.Attribute.BOLD] = false;\n\n    // Apply code formatting\n    function formatCode() {\n    var selection = DocumentApp.getActiveDocument().getSelection();\n    if (selection) {\n        var elements = selection.getRangeElements();\n        for (var i = 0; i < elements.length; i++) {\n        var element = elements[i];\n\n        // Only modify elements that can be edited as text; skip images and other non-text elements.\n        if (element.getElement().editAsText) {\n            var text = element.getElement().editAsText();\n\n            // Style the selected part of the element, or the full element if it's completely selected.\n            if (element.isPartial()) {\n            text.setAttributes(element.getStartOffset(), element.getEndOffsetInclusive(), style);\n            } else {\n            text.setAttributes(style);\n            }\n        }\n        }\n    }\n    }\n    ```\n\n1. Assign a trigger to run the onOpen function \"On open\" (`Edit > Current Project's Triggers`)\n\n1. After authorizing the script, reload the original document\n\n1. Use the new menu item to format selected text (`Styles > Format Code`)\n\n[Source](https://webapps.stackexchange.com/a/117682/56505)\n"
  },
  {
    "path": "GraphQL/README.md",
    "content": "# GraphQL\n\n## Learning resources\n\n- [GraphQL: A success story for PayPal Checkout](https://medium.com/paypal-engineering/graphql-a-success-story-for-paypal-checkout-3482f724fb53)\n- [Scaling GraphQL at PayPal](https://medium.com/paypal-engineering/scaling-graphql-at-paypal-b5b5ac098810)\n- [REST vs. GraphQL: A Critical Review](https://goodapi.co/blog/rest-vs-graphql)\n\n### Videos\n\n- [Ben Awad GraphQL playlists](https://www.youtube.com/user/99baddawg/playlists)\n- [How to Move a Mountain? GraphQL Best Practices — Kewei Qu @ GraphQL Conf 2019](https://youtu.be/YCmtNB61BS8)\n- [Refactoring Your Mind From REST — Lachlan Young @ GraphQL Conf 2019](https://youtu.be/xHLzguFd8Ug?t=206)\n\n### Podcasts\n\n- [{CodingBlocks}.NET 3factor app – Realtime GraphQL](https://podcasts.google.com/?feed=aHR0cDovL3d3dy5jb2RpbmdibG9ja3MubmV0L2ZlZWQv&episode=aHR0cHM6Ly93d3cuY29kaW5nYmxvY2tzLm5ldC8_cD04Mzky)\n\n## Projects which can be used as reference\n\n- [Spectrum](https://github.com/withspectrum/spectrum)\n\n## Tools\n\n- [GraphiQL](https://github.com/graphql/graphiql)\n- [Public GraphQL APIs](http://apis.guru/graphql-apis/)\n- [TypeGraphQL](https://typegraphql.ml)\n- [PostGraphile](https://www.graphile.org/postgraphile/)\n- [GraphQL Code Generator](https://graphql-code-generator.com)\n\n#### [Apollo Client Developer Tools](https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm)\n\nGraphiQL Explorer got integrated into DevTools in April 2019:\n\n- [Integrate GraphiQL Explorer into devtools #199](https://github.com/apollographql/apollo-client-devtools/pull/199).\n\nBesides the newly introduced Explorer, it gives a great summary of all the queries, mutations and caching done for a page.\n\nHere you can see all its features:\n\n- [GraphiQL Explorer 2.0: A power-user release!](https://www.onegraph.com/blog/2019/05/30/GraphiQL_Explorer_2_0_A_Power_User_Release.html)\n"
  },
  {
    "path": "Java/Country.java",
    "content": "public enum Country {\n\n    Austria(\"Austria\", \"AT\", \"AUT\", 40, \"+43\"),\n    Albania(\"Albania\", \"AL\", \"AUB\", 8, \"+355\"),\n    Belgium(\"Belgium\", \"BE\", \"BEL\", 56, \"+32\"),\n    BosniaAndHerzegovina(\"Bosnia and Herzegovina\", \"BA\", \"BIH\", 70, \"+387\"),\n    Bulgaria(\"Bulgaria\", \"BG\", \"BGR\", 100, \"+359\"),\n    Croatia(\"Croatia\", \"HR\", \"HRV\", 191, \"+385\"),\n    Cyprus(\"Cyprus\", \"CY\", \"CYP\", 196, \"+357\"),\n    Czechia(\"Czechia\", \"CZ\", \"CZE\", 203, \"+420\"),\n    Denmark(\"Denmark\", \"DK\", \"DNK\", 208, \"+45\"),\n    Estonia(\"Estonia\", \"EE\", \"EST\", 233, \"+372\"),\n    FaroeIslands(\"Faroe Islands\", \"FO\", \"FRO\", 234, \"+298\"),\n    Finland(\"Finland\", \"FI\", \"FIN\", 246, \"+358\"),\n    France(\"France\", \"FR\", \"FRA\", 250, \"+33\"),\n    Germany(\"Germany\", \"DE\", \"DEU\", 276, \"+49\"),\n    Greece(\"Greece\", \"GR\", \"GRC\", 300, \"+30\"),\n    Hungary(\"Hungary\", \"HU\", \"HUN\", 384, \"+36\"),\n    Iceland(\"Iceland\", \"IS\", \"ISL\", 352, \"+354\"),\n    Ireland(\"Ireland\", \"IE\", \"IRL\", 372, \"+353\"),\n    Italy(\"Italy\", \"IT\", \"ITA\", 380, \"+39\"),\n    Latvia(\"Latvia\", \"LV\", \"LVA\", 428, \"+371\"),\n    Lithuania(\"Lithuania\", \"LT\", \"LTU\", 440, \"+370\"),\n    Luxembourg(\"Luxembourg\", \"LU\", \"LUX\", 442, \"+352\"),\n    Macedonia(\"Macedonia\", \"MK\", \"MKD\", 807, \"+389\"),\n    Malta(\"Malta\", \"MT\", \"MLT\", 470, \"+356\"),\n    Moldova(\"Moldova\", \"MD\", \"LUX\", 498, \"+373\"),\n    Montenegro(\"Montenegro\", \"ME\", \"MNE\", 499, \"+382\"),\n    Netherlands(\"Netherlands\", \"NL\", \"NLD\", 528, \"+31\"),\n    Norway(\"Norway\", \"NO\", \"NOR\", 578, \"+47\"),\n    Poland(\"Poland\", \"PL\", \"POL\", 616, \"+48\"),\n    Portugal(\"Portugal\", \"PT\", \"PRT\", 620, \"+351\"),\n    Romania(\"Romania\", \"RO\", \"ROU\", 642, \"+40\"),\n    Serbia(\"Serbia\", \"RS\", \"SRB\", 688, \"+381\"),\n    Slovakia(\"Slovakia\", \"SK\", \"SVK\", 703, \"+421\"),\n    Slovenia(\"Slovenia\", \"SI\", \"SVN\", 705, \"+386\"),\n    Spain(\"Spain\", \"ES\", \"ESP\", 724, \"+34\"),\n    Sweden(\"Sweden\", \"SE\", \"SWE\", 752, \"+46\"),\n    Switzerland(\"Switzerland\", \"CH\", \"CHE\", 756, \"+41\"),\n    Ukraine(\"Ukraine\", \"UA\", \"UKR\", 804, \"+380\"),\n    UnitedKingdom(\"United Kingdom\", \"GB\", \"GBR\", 826, \"+44\");\n\n    // Short name in English\n    public String name;\n\n    // http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n    public String alpha2;\n\n    // http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\n    public String alpha3;\n\n    // http://en.wikipedia.org/wiki/ISO_3166-1_numeric\n    public int numeric;\n\n    // https://en.wikipedia.org/wiki/List_of_country_calling_codes\n    public String callingCode;\n\n    Country(String name, String alpha2, String alpha3, int numeric, String callingCode) {\n        this.name = name;\n        this.alpha2 = alpha2;\n        this.alpha3 = alpha3;\n        this.numeric = numeric;\n        this.callingCode = callingCode;\n    }\n}\n"
  },
  {
    "path": "Java/FixturesBuilder.java",
    "content": "import lombok.AccessLevel;\nimport lombok.NoArgsConstructor;\n\n@NoArgsConstructor(access = AccessLevel.PRIVATE)\npublic class FixturesBuilder {\n\n    public static final String COUNTRY_CODE = \"EE\";\n    public static final String EMAIL = \"gabriel@reliikvia.ee\";\n    public static final String PHONE_NUMBER = \"+37212341234\";\n    public static final String NAME = \"Gabriel\";\n\n    // Assumes Person is annotated with Lombok @Builder\n    public static Person.PersonBuilder aPerson() {\n        return Person.builder()\n                .name(NAME)\n                .countryCode(COUNTRY_CODE)\n                .email(EMAIL)\n                .phoneNumber(PHONE_NUMBER);\n    }\n\n    public static Person.PersonBuilder aMan() {\n        return aPerson().gender(1);\n    }\n}\n"
  },
  {
    "path": "Java/README.md",
    "content": "# Java\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Spring](#spring)\n- [Lombok](#lombok)\n  - [Create private constructor](#create-private-constructor)\n- [Maven](#maven)\n  - [Basic commands](#basic-commands)\n- [Gradle](#gradle)\n  - [Basic commands](#basic-commands-1)\n  - [Plugins](#plugins)\n  - [Set console=rich by default](#set-consolerich-by-default)\n  - [Print the full stacktrace when logging tests exceptions](#print-the-full-stacktrace-when-logging-tests-exceptions)\n  - [Upgrade all dependencies to their latest version](#upgrade-all-dependencies-to-their-latest-version)\n- [SDKMAN](#sdkman)\n  - [Set up a specific Java version for a project](#set-up-a-specific-java-version-for-a-project)\n  - [Switch Java version automatically when you cd into a directory](#switch-java-version-automatically-when-you-cd-into-a-directory)\n- [Flyway](#flyway)\n- [NeoVim for Java](#neovim-for-java)\n  - [Groovy](#groovy)\n  - [Google Java Format](#google-java-format)\n  - [Lombok](#lombok-1)\n- [IntelliJ IDEA](#intellij-idea)\n  - [Install on Linux](#install-on-linux)\n  - [Find in files regexes](#find-in-files-regexes)\n  - [Object to JSON in debugger](#object-to-json-in-debugger)\n  - [Favorite plugins](#favorite-plugins)\n  - [Settings](#settings)\n    - [Navigate back and forward using mouse buttons clicks](#navigate-back-and-forward-using-mouse-buttons-clicks)\n    - [Enable changing the font size with the mouse wheel](#enable-changing-the-font-size-with-the-mouse-wheel)\n    - [Prevent IDEA from automatically close opened files](#prevent-idea-from-automatically-close-opened-files)\n  - [Shortcuts](#shortcuts)\n  - [Useful links](#useful-links)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Spring\n\n- [Write parameterized tests with autowiring dependency injection in Spring Boot 1](https://stackoverflow.com/a/63168806/334569)\n- [Setting a TTL for @Cacheable](https://stackoverflow.com/a/44203099/334569)\n\n## Lombok\n\n### Create private constructor\n\n```java\n@NoArgsConstructor(access = AccessLevel.PRIVATE)\n```\n\n## Maven\n\n### Basic commands\n\n```sh\n# Display available updates\nmvn versions:display-dependency-updates\n\n# Execute only the tests in SomeTestClass\nmvn test -Dtest=SomeTestClass\n\n# Stop immediately after the first failing test\nmvn test -Dsurefire.skipAfterFailureCount=1\n``` \n\n## Gradle\n\n### Basic commands\n\n```sh\n# Tasks runnable from root project\ngradle tasks\n\n# Build displaying more logging information\ngradle -i build\n\n# Executes only the tests in SomeTestClass\ngradle test --tests SomeTestClass\n\n# Executes only one specific test method\ngradle test --tests SomeTestClass.specificMethod\n\n# Stop immediately after the first failing test\ngradle test --fail-fast\n```\n\n### Plugins\n\nSince Gradle version 3 plugins can be specified through the plugins DSL:\n\n```groovy\nplugins {\n    id 'java'\n}\n```\n\nThe `plugins {}` block must be a top level statement in the buildscript and cannot be nested inside another construct.\n\n### Set console=rich by default\n\nBoth in _Gradle_ and _Gradle Wrapper_, add the following line to your `./gradle.properties`:\n\n```\norg.gradle.console=rich\n```\n\n### Print the full stacktrace when logging tests exceptions\n\nAdd the following block to your `./build.gradle`:\n\n```groovy\ntest {\n    testLogging.exceptionFormat = 'full'\n}\n```\n\n### Upgrade all dependencies to their latest version\n\nUse [Gradle Use Latest Versions Plugin ](https://github.com/patrikerdes/gradle-use-latest-versions-plugin).\n\n## SDKMAN\n\nSDKMAN allows to install multiple versions of Java and conveniently switch between them.\n\n### Set up a specific Java version for a project\n\n1. cd into the base directory of your project\n\n1. use SDKMAN to switch to the desired Java version\n\n1. run `sdk env init` (this will generate a `.sdkmanrc` file in the current directory, pre-populated with the Java version in use)\n\nFrom now on when you enter your project base directory you can switch to the chosen Java version by simply running:\n\n```sh\n$ sdk env\n```\n\n### Switch Java version automatically when you cd into a directory\n\nSet the folling in your `~/.sdkman/etc/config`:\n\n```sh\nsdkman_auto_env=true \n```\n\n## Flyway\n\n_Flyway_ is an open-source database migration tool: it is based around just 7 basic commands: `migrate`, `clean`, `info`, `validate`, `undo`, `baseline` and `repair`.\n\nMigrations files names must comply with [Flyway naming pattern](https://flywaydb.org/documentation/concepts/migrations.html#naming).\n\nTo check that flyway is configured correctly and to see the list of pending migrations run:\n\n```sh\nflyway info\n```\n\nTo run the pending migrations run:\n\n```sh\nflyway migrate\n```\n\nRolling back/undo migrations is availble only for _Flyway Pro_ or _Enterprise Edition_. To roll back with the _Community Edition_ you need to:\n\n- locally:\n\n   1. run `flyway clean`\n\n   1. move the migrations you want to roll back out of `flyway.locations`\n\n   1. run `flyway migrate`\n\n   1. move the migrations you rolled back in `flyway.locations`\n\n- staging/production:\n\n   1. write migrations which revert the changes made in the migrations you want to roll back\n\n   1. commit, push and deploy the migrations\n\nFor furthern info check the [Flyway documentation](https://flywaydb.org/documentation/).\n\n## NeoVim for Java\n\nThe following steps outline a basic setup for working with Java in NeoVim, enabling these key features: syntax highlighting, code navigation, code refactoring, code completion, formatting, debugging, diagnostics (errors, warnings, etc.), hover information, auto imports.\n\n1. Install SDKMAN with `curl -s \"https://get.sdkman.io\" | bash`\n\n1. Install the latest stable version of Java with `sdk install java`\n\n1. Install [NeoVim](../Linux/README.md#install-the-latest-version-on-ubuntu)\n\n1. Install [LazyVim](../Linux/README.md#lazyvim)\n\n1. Create `~/.config/nvim/lua/plugins/treesitter.lua` and paste in the following:\n\n   ```lua\n   return {\n     \"nvim-treesitter/nvim-treesitter\",\n     opts = {\n       ensure_installed = {\n         \"java\",\n       },\n     },\n   }\n   ```\n\n1. Run `:Mason`, select `jdtls` and press `i` to install it, go up to the top and wait until you see it is installed.\n\n1. Create `~/.config/nvim/lua/plugins/jdtls.lua` and paste in the following:\n\n   ```lua\n   return {\n     {\n       \"mfussenegger/nvim-jdtls\",\n       ft = \"java\",\n     }\n   }\n   ```\n\n### Groovy\n\nSupport to _Groovy_ might be needed for example if you are using the [Spock](https://github.com/spockframework/spock) test framework.\n\n1. Append `\"groovy\",` to the `ensure_installed` object in the `treesitter.lua` file mentioned above.\n\n1. To be continued...\n\n### Google Java Format\n\n[google-java-format](https://github.com/google/google-java-format) is not supported by [eclipse.jdt.ls](https://github.com/eclipse-jdtls/eclipse.jdt.ls) (see [redhat-developer/vscode-java#663](https://github.com/redhat-developer/vscode-java/issues/663) & [redhat-developer/vscode-java#419](https://github.com/redhat-developer/vscode-java/issues/419)) but given that it's an executable you should be able to use it with formatprg, see `:help formatprg`.\n\n### Lombok\n\nTo be continued...\n\n## IntelliJ IDEA\n\n### Install on Linux\n\n[Install as a snap package](https://www.jetbrains.com/help/idea/installation-guide.html#snap) to have your installation always up to date.\n\nAlternatively, install manually with the following steps:\n\n1. Download [IntelliJ IDEA](https://www.jetbrains.com/idea/download/#section=linux)\n\n1. Unpack the `tar.gz` file to an empty directory using the following command:\n\n   ```sh\n   tar -xzf idea-2020.2.1.tar.gz\n   ```\n\n1. Run `bin/idea.sh`\n\n### Find in files regexes\n\n```sh\n# Find files which contain two strings on any line\n(string1)[\\s\\S]*(string2)|\\2[\\s\\S]*\\1\n\n# Find files which contain two strings on the same line\n\\Qstring1\\E.*\\Qstring2\\E\n\n# Find in files excluding packages and imports statements\n^(?!import|package).*wordToSearch\n```\n\n### Object to JSON in debugger\n\n- [Get object as JSON in IntelliJ Idea from debugger](https://stackoverflow.com/a/60189764/334569)\n\n### Favorite plugins\n\n- [Lombok plugin](https://plugins.jetbrains.com/plugin/6317)\n\n- [Visual Studio Code Dark Plus Theme](https://plugins.jetbrains.com/plugin/12255-visual-studio-code-dark-plus-theme)\n\n### Settings\n\n#### Navigate back and forward using mouse buttons clicks\n\nKeymap > Navigate > Back | Forward > right click > Add mouse shortcut\n\n#### Enable changing the font size with the mouse wheel\n\nEditor > General > Change font size with Ctrl+Mouse Wheel\n\n#### Prevent IDEA from automatically close opened files\n\nEditor > General > Editor Tabs > Tab limit = 100\n\n### Shortcuts\n\nKey|Command|Notes\n---|-------|----------\n`Ctrl+Shift+A` | Find action | *Enables you to search for commands and settings across all menus and tools (similarly to VsCode \"Show all commands\" - Ctrl+Shift+P)*\n`Shift Shift` | Search for a target by name (Search everywhere) | *Find any item in the project or outside of it by its name: files, actions, classes, symbols, settings, and UI elements. (similar - but more powerful - than VsCode \"Go to File..., Quick Open\" - Ctrl+P)*\n`Ctrl+Shift+F` | Find in path | *Search for a text string within a project*\n`Ctrl+E` | Open Recent files | \n`Ctrl+Shift+E` | Open Recent Edited files | \n`Ctrl+F12` | Locate a code element | *Open the structure view popup allowing to jump to the desired element*\n`Ctrl+N` | Navigate to class |\n`Ctrl+Shift+N` | Navigate to file by file name |\n`Ctrl+Alt+Shift+N` | Navigate to symbol in project (class, method, etc) |\n\n### Useful links\n\n- [KAFKA explained in a children’s book](https://www.gentlydownthe.stream/)\n"
  },
  {
    "path": "Javascript/README.md",
    "content": "# Javascript\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Promises](#promises)\n- [Frameworks and Libraries](#frameworks-and-libraries)\n  - [AngularJS](#angularjs)\n- [NodeJS](#nodejs)\n  - [Installation](#installation)\n    - [Fast Node Manager (fnm)](#fast-node-manager-fnm)\n      - [Windows setup](#windows-setup)\n      - [Fix node version not being changed automatically on directory change](#fix-node-version-not-being-changed-automatically-on-directory-change)\n      - [Fix the \"Can't create the symlink for multishells\" error](#fix-the-cant-create-the-symlink-for-multishells-error)\n    - [Node Version Manager (nvm)](#node-version-manager-nvm)\n  - [The Event Loop](#the-event-loop)\n  - [The Worker Pool (aka the Thread Pool)](#the-worker-pool-aka-the-thread-pool)\n  - [Scaling](#scaling)\n  - [REPL](#repl)\n  - [Conferences videos](#conferences-videos)\n  - [Node Package Manager (npm)](#node-package-manager-npm)\n    - [Remove modules not listed in package.json](#remove-modules-not-listed-in-packagejson)\n    - [Upgrade your dependencies to the latest versions](#upgrade-your-dependencies-to-the-latest-versions)\n    - [How to keep your dependencies up to date](#how-to-keep-your-dependencies-up-to-date)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Promises\n\nA promise is an object that may produce a single value some time in the future: either a resolved value, or a reason that it’s not resolved (e.g., a network error occurred). A promise may be in one of 3 possible states:\n\n- fulfilled\n- rejected\n- pending\n\nPromise users can attach callbacks to handle the fulfilled value or the reason for rejection. Promises are eager, meaning that a promise will start doing whatever task you give it as soon as the promise constructor is invoked.\n\nA chain of promises without a catch at the end can potentially hide an issue by making errors failing silently. If you have to debug a big codebase, you can use the `unhandledRejection` hook to find all unhandled Promise rejections:\n\n```js\nprocess.on('unhandledRejection', (err) => {\n  console.log(err)\n})\n```\n\n## Frameworks and Libraries\n\nA framework owns the main() function, it performs some function like managing a collection of windows on the screen, it can run even without customization. The framework defines the overall nature of the program, while your code provides specific customizations.\n\nA library is a box of tools used by your code. Your code owns main() and provides the overall structure of the program. The library does some specific task, like sending traffic over the network, computing bessel functions, etc. A library can do big things, like draw a view of a three-dimensional space full of objects, but only after you tell it about the objects.\n\n- [Source](https://qr.ae/pNt5QI)\n\n### AngularJS\n\nA framework mainly maintained by Google, was superseded by [Angular](https://en.wikipedia.org/wiki/Angular_(web_framework)) in 2016.\n\n* [Angular 1 Style Guide](https://github.com/johnpapa/angular-styleguide/tree/master/a1) by John Papa\n* [AngularJS styleguide (ES2015)](https://github.com/toddmotto/angularjs-styleguide) by Todd Motto\n* [AngularJS with Gulp Step by Step](https://youtu.be/p9ZngMW80-k) by Mark Winterbottom\n* [Designing and Building Component-based AngularJS Applications](https://app.pluralsight.com/library/courses/component-based-angularjs-applications) by Miguel Castro\n* [Ultimate AngularJS Component Oriented Design Guide](http://gautierdelorme.com/2016/04/20/ultimate-angularjs-component-oriented-design-guide.html) by Gautier Delorme\n\n## NodeJS\n\nNode.js is a JavaScript runtime or platform which is built on Google Chrome’s JavaScript v8 engine. This runtime allows executing the JavaScript code on any machine outside a browser (this means that it is the server that executes the Javascript and not the browser).\n\nNode.js is single-threaded and employs a concurrency model based on an event loop. It doesn’t block the execution instead registers a callback which allows the application to continue: that means Node.js can handle concurrent operations without creating multiple threads of execution thus can scale pretty well.\n\nThe areas where it’s perfect to use Node.js are:\n\n- I/O bound Applications\n- Data Streaming Applications\n- Data Intensive Real-time Applications (DIRT)\n- JSON APIs based Applications\n- Single Page Applications\n\nNode.js is not suitable for heavy applications involving more of CPU usage.\n\nNode.js uses an _event-driven architecture_: it has an _Event Loop_ for orchestration and a _Worker Pool_ for expensive tasks.\n\n### Installation\n\nThe best way to install Node.js is through a node version manager: it is especially useful when working on various projects that have different Node.js versions requirements by making it easy to upgrade to new versions or to automatically switch between existing versions of Node.js when changing directory.\n\n#### Fast Node Manager (fnm)\n\nThe best node version manager is [fnm (Fast Node Manager)](https://github.com/Schniz/fnm). When compared to `nvm`, `fnm` is much faster, has a smaller footprint and it's cross-platform.\n\n##### Windows setup\n\nRun as Administrator:\n\n```powershell\nSet-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted\n``` \n\nAdd the following to the end of your profile file:\n\n```powershell\nfnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression\n``` \n\n##### Fix node version not being changed automatically on directory change\n\nIn your .bashrc, replace:\n\n```sh\neval \"$(fnm env)\"\n```\n\nwith:\n\n```sh\neval \"$(fnm env --use-on-cd)\"\n```\n\n##### Fix the \"Can't create the symlink for multishells\" error\n\nWhen you open a shell you get the following error:\n\n```sh\nerror: Can't create the symlink for multishells at \"/run/user/1000/fnm_multishells/2354_1691420468557\". Maybe there are some issues with permissions for the directory? Permission denied (os error 13)\n```\n\nAs a workaround, until the issue will be fixed by fnm developers, add to your `~/.bashrc` the following line just before the eval for fnm:\n\n```sh\nexport XDG_RUNTIME_DIR=\"$HOME/.cache/xdgr\"\n```\n\nThumb up https://github.com/Schniz/fnm/issues/938 to raise the visibility of the issue. \n\n#### Node Version Manager (nvm)\n\nAn alternative way to install Node.js is through [nvm (Node Version Manager)](https://github.com/nvm-sh/nvm).\n\nOn Linux:\n\n1. follow [these instructions](https://github.com/nvm-sh/nvm#install--update-script)\n\n1. [automatically call `nvm use` in a directory with a `.nvmrc` file](https://github.com/nvm-sh/nvm#automatically-call-nvm-use)\n\nOn Windows, [install it with Chocolatey](https://chocolatey.org/packages/nvm).\n\nSome useful commands:\n\n```sh\n# List installed versions\nnvm ls\n\n# List remote versions available for install, only show LTS (long-term support) versions\nnvm ls-remote --lts\n\n# Download and install a <version>, uses .nvmrc if available\nnvm install <version>\n\n# Modify PATH to use <version>, uses .nvmrc if available\nnvm use <version>\n\n# Display currently activated version of Node\nnvm current\n\n# Generate a .nvmrc file with the Node version currently used\nnode -v > .nvmrc\n\n# Upgrade to the latest working npm on the given node version\nnvm install-latest-npm\n```\n\n### The Event Loop\n\nNode.js processes incoming requests in the event loop: it's what allows Node.js to perform non-blocking operations despite the fact that JavaScript is single-threaded. \n\nThe Event Loop notices each new client connection and orchestrates the generation of a response. All incoming requests and outgoing responses pass through the Event Loop. This means that if the Event Loop spends too long at any point, all current and new clients will not get a turn. You should make sure you never block the Event Loop. In other words, each of your JavaScript callbacks should complete quickly.\n\nA good way to ensure this is to reason about the \"computational complexity\" of your callbacks. If your callback takes a constant number of steps no matter what its arguments are, then you'll always give every pending client a fair turn. If your callback takes a different number of steps depending on its arguments, then you should think about how long the arguments might be.\n\nTwo common ways to block the Event Loop are (1) using a _vulnerable_ regular expression or (2) using `JSON.parse` and `JSON.stringify`.\n\nIf you want to do complex calculations in JavaScript without blocking the Event Loop, you have two options: partitioning or offloading.\n\n- [What the heck is the event loop anyway? | Philip Roberts | JSConf EU](https://youtu.be/8aGhZQkoFbQ)\n\n### The Worker Pool (aka the Thread Pool)\n\nNode.js runs JavaScript code in the Event Loop (initialization and callbacks), and offers a Worker Pool to handle expensive tasks like file I/O. Node.js scales well, sometimes better than more heavyweight approaches like Apache. The secret to the scalability of Node.js is that it uses a small number of threads to handle many clients. If Node.js can run with fewer threads, then it can spend more of your system's time and memory working on clients rather than on paying space and time overheads for threads (memory, context-switching). But because Node.js has only a few threads, you must structure your application to use them wisely. A good rule of thumb for keeping your Node.js server speedy is: Node.js is fast when the work associated with each client at any given time is \"small\".\n\nNode.js uses the Worker Pool to handle \"expensive\" tasks. This includes I/O for which an operating system does not provide a non-blocking version, as well as particularly CPU-intensive tasks. The Node.js module APIs that make use of this Worker Pool are:\n\n- I/O-intensive: DNS, File System\n- CPU-intensive: Crypto, Zlib\n\n- [Don't Block the Event Loop (or the Worker Pool)](https://nodejs.org/uk/docs/guides/dont-block-the-event-loop/)\n\n### Scaling\n\nIt can handle concurrent operations without creating multiple threads of execution (low resource cost per connection).\n\nIn a one-thread-per-client system like Apache, each pending client is assigned its own thread. If a thread handling one client blocks, the operating system will interrupt it and give another client a turn. The operating system thus ensures that clients that require a small amount of work are not penalized by clients that require more work.\n\nBecause Node.js handles many clients with few threads, if a thread blocks handling one client's request, then pending client requests may not get a turn until the thread finishes its callback or task. The fair treatment of clients is thus the responsibility of your application. This means that you shouldn't do too much work for any client in any single callback or task.\n\nThis is part of why Node.js can scale well, but it also means that you are responsible for ensuring fair scheduling.\n\n### REPL\n\nThe REPL stands for _Read Eval Print Loop__: it is a simple program that accepts the commands, evaluates them, and finally prints the results. REPL provides an environment similar to that of Unix/Linux shell or a window console, in which we can enter the command and the system, in turn, responds with the output. REPL performs the following tasks.\n\n- READ: it Reads the input from the user, parses it into JavaScript data structure and then stores it in the memory.\n- EVAL: it Executes the data structure.\n- PRINT: it Prints the result obtained after evaluating the command.\n- LOOP: it Loops the above command until the user presses Ctrl+C two times.\n\n### Conferences videos\n\n- [Node+JS Interactive 2015](https://www.youtube.com/watch?v=O28Knn00qYo&list=PLfMzBWSH11xYjL8oFumSfzOf6-kr8_t-o)\n- [Node+JS Interactive 2016 - Europe](https://www.youtube.com/watch?v=GD-Fw6VNtUc&list=PLfMzBWSH11xZKfC2b-XWJRMtl9y-jtQBN)\n- [Node+JS Interactive 2016 - North America](https://www.youtube.com/watch?v=HxGt_3F0ULg&list=PLfMzBWSH11xYaaHMalNKqcEurBH8LstB8)\n- [Node.js Live Events 2016 - Paris & London](https://www.youtube.com/watch?v=czbfOM6DY1Q&list=PLfMzBWSH11xZWvE3iuTw6tdzp90gnODdp)\n- [Node+JS Interactive 2017 - Vancouver](https://www.youtube.com/watch?v=zphcsoSJMvM&list=PLfMzBWSH11xa-iNnQG2555lgi4574nZOh)\n- [Node+JS Interactive 2018](https://www.youtube.com/watch?v=7-tcLvyaEBM&list=PLfMzBWSH11xaZvhv1X5Fq1H-oMdnAtG6k)\n- [Node+JS Interactive 2019](https://www.youtube.com/watch?v=3JNYBdS-uXU&list=PLfMzBWSH11xZPfWcC0DqFqKo_reMP58mw)\n\n### Node Package Manager (npm)\n\nThe _Node Package Manager_ provides the following two main functionalities:\n\n- online repository for node.js packages/modules which are present at <nodejs.org>.\n\n- command line utility to install packages, do version management and dependency management of Node.js packages.\n\nNPM comes bundled along with Node.js installable.\n\n#### Remove modules not listed in package.json\n\n```powershell\nnpm prune\n```\n\n#### Upgrade your dependencies to the latest versions\n\n```powershell\nnpm install -g npm-check-updates\nncu\nncu -u\n```\n\nSee:\n- [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)\n\n#### How to keep your dependencies up to date\n\n- [npm-outdated](https://docs.npmjs.com/cli/outdated.html)\n- [npm-update](https://docs.npmjs.com/cli/update.html)\n- [npm-check](https://www.npmjs.com/package/npm-check)\n- [Validating dependencies in the project with npm-check and depcheck](https://medium.com/@wlodarczyk_j/validating-dependencies-in-the-project-with-npm-check-and-depcheck-20e83345fc1f)\n- [Semantic versioning](https://semver.org/)\n"
  },
  {
    "path": "Kubernetes/README.md",
    "content": "# Kubernetes (k8s)\n\n## Basic operations\n\n```sh\n# Delete all failed pods with a specific name\nkubectl get pods --field-selector 'status.phase=Failed' -o name | grep podname | xargs kubectl delete\n```\n\n## Cluster management GUIs\n\n- [Lens](https://k8slens.dev/)\n\n- [k9s](https://k9scli.io/)\n"
  },
  {
    "path": "Linux/.bash_profile",
    "content": "# Enable reverse-i-search forward with Ctrl+S\nstty -ixon\n"
  },
  {
    "path": "Linux/.bashrc",
    "content": "# Colorize your cat output\nalias dog='pygmentize -O console256 -g'\n\n# Human readable files list in terminal\n# -l = use a long listing format\n# -h = print sizes like 1K, 234M, 2G, etc.\n# -p = append `/` indicator to directories\n# -a = hidden files/directories\nalias dir='ls -lhpA --color --group-directories-first'\n\n# Make grep ignore case and highlight matching string\nalias grep=\"grep --ignore-case --color\"\n\n# Identify a zombie process\nalias zombie=\"ps axo stat,ppid,pid,comm | grep -w defunct\"\n\n# Avoid duplicates\nHISTCONTROL=ignoredups:erasedups\n# When the shell exits, append to the history file instead of overwriting it\nshopt -s histappend\n# After each command, append to the history file and reread it\nPROMPT_COMMAND=\"${PROMPT_COMMAND:+$PROMPT_COMMAND$'\\n'}history -a; history -c; history -r\"\n\n# >>> Prompt renderers\n\n# Option 1: like posh-git\n# https://askubuntu.com/questions/730754/how-do-i-show-the-git-branch-with-colours-in-bash-prompt\nforce_color_prompt=yes\ncolor_prompt=yes\nparse_git_branch() {\n\t  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/(\\1)/'\n  }\nif [ \"$color_prompt\" = yes ]; then\n\t  PS1='${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[01;31m\\]$(parse_git_branch)\\[\\033[00m\\]\\$ '\n  else\n\t    PS1='${debian_chroot:+($debian_chroot)}\\u@\\h:\\w$(parse_git_branch)\\$ '\nfi\nunset color_prompt force_color_prompt\n# Enable git aliases auto completion\nsource /usr/share/bash-completion/completions/git\n\n# Option 2: oh-my-posh\n# 1. curl -s https://ohmyposh.dev/install.sh | bash -s\n# 2. oh-my-posh font install Inconsolata\n# 3. wget https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/powerlevel10k_rainbow.omp.json -P .config/\n# 4. echo 'eval \"$(oh-my-posh init bash --config ~/.config/powerlevel10k_rainbow.omp.json)\"' >> ~/.profile\n# For enabling language versions display in your theme see https://github.com/JanDeDobbeleer/oh-my-posh/discussions/5902#discussioncomment-11284862\n\n# Install updates, set Docker containers to not autorestart\nalias update='sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; sdk update; sudo snap refresh; docker update --restart=no $(docker container ls -a -q)'\n\n# Colorize ip output\nalias ip='ip -c'\n"
  },
  {
    "path": "Linux/.vimrc",
    "content": "\" Place yanked text into the global clipboard\nset clipboard=unnamedplus\n\n\" Display line numbers\nset number\n\n\" Enable syntax highlighting\nsyntax on\n\n\" Enable mousewheel scrolling\n\" (press Alt+Shift while selecting to copy without line numbers)\nset mouse=a\n"
  },
  {
    "path": "Linux/README.md",
    "content": "# Linux\n\n_Table of Contents_\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [First things to do after installation](#first-things-to-do-after-installation)\n- [Get your operating system information](#get-your-operating-system-information)\n- [Get your hardware information](#get-your-hardware-information)\n- [Remove the green background color from the directory listing](#remove-the-green-background-color-from-the-directory-listing)\n- [Display line numbers in your cat output](#display-line-numbers-in-your-cat-output)\n- [Print a file from line to line](#print-a-file-from-line-to-line)\n- [Copy files from Linux to Windows](#copy-files-from-linux-to-windows)\n- [Find files by name and show all their properties](#find-files-by-name-and-show-all-their-properties)\n- [Find the differences between two files](#find-the-differences-between-two-files)\n- [Find all files containing a string](#find-all-files-containing-a-string)\n- [List running processes](#list-running-processes)\n- [Set an empty password for a user](#set-an-empty-password-for-a-user)\n- [Services commands](#services-commands)\n- [CLI Tools](#cli-tools)\n- [Shell scripts](#shell-scripts)\n  - [Validation](#validation)\n  - [Debugging](#debugging)\n- [Presentations from command line](#presentations-from-command-line)\n- [Set your terminal default editor](#set-your-terminal-default-editor)\n- [cd to the previous directory](#cd-to-the-previous-directory)\n- [Troubleshoot network issues](#troubleshoot-network-issues)\n- [Neovim](#neovim)\n  - [Install the latest version on Ubuntu](#install-the-latest-version-on-ubuntu)\n  - [Setup](#setup)\n    - [LazyVim](#lazyvim)\n    - [Using NvChad](#using-nvchad)\n      - [NvChad useful commands](#nvchad-useful-commands)\n    - [Using kickstart](#using-kickstart)\n  - [Vim usesul commands](#vim-usesul-commands)\n  - [Learning resources](#learning-resources)\n  - [Troubleshooting](#troubleshooting)\n  - [Must have plugins](#must-have-plugins)\n- [Arch Linux](#arch-linux)\n  - [Update the system](#update-the-system)\n  - [Search for a package](#search-for-a-package)\n  - [Install AUR (Arch User Repository) packages](#install-aur-arch-user-repository-packages)\n  - [Install Java through SDKMAN](#install-java-through-sdkman)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## First things to do after installation \n\n1. Update the system packages:\n   ```sh\n   sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y\n   ```\n\n1. Copy the content of [`.bashrc`](.bashrc) to your `~/.bashrc`\n\n## Get your operating system information\n\n```sh\ncat /etc/os-release\n# or\nlsb_release -a\n```\n\n## Get your hardware information\n\n```sh\nlshw -short\n```\n\n## Remove the green background color from the directory listing\n\n```sh\ndircolors -p > ~/.dircolors\nvim ~/.dircolors\n# Remove ;41 ;42 ;43 ;44 from the lines beginning with\n# SETUID, SETGID, CAPABILITY, STICKY_OTHER_WRITABLE, OTHER_WRITABLE and STICKY\nvim ~/.bashrc\n# Append the following line\neval 'dircolors ~/.dircolors' > /dev/null\n```\n\n- [Source](https://unix.stackexchange.com/questions/94498/what-causes-this-green-background-in-ls-output)\n\n## Display line numbers in your cat output\n\n```sh\ncat -n <file-path>\n```\n\n## Print a file from line to line\n\n```sh\nsed -n 10,20p <file-path>\n```\n\n## Copy files from Linux to Windows\n\n- Install `openssh-server` and `net-tools` on Linux\n\n- Intall `Putty` on Windows (with [Chocolatey](https://chocolatey.org/packages/putty))\n\n```sh\n# Assuming 192.168.10.12 is your Linux IP address,\n# write the following command in a shell on Windows:\npscp user@192.168.10.12:/source/path/on/linux/* c:\\Destination\\Path\\On\\Windows\n```\n\n## Find files by name and show all their properties\n\n```sh\nfind . -name <file_name_or_pattern> | xargs ls -lhpa --color --group-directories-first\n```\n\n## Find the differences between two files\n\n```sh\ncomm -3 old.csv new.csv\n# or\ndiff --suppress-common-lines --side-by-side old.csv new.csv\n```\n\n## Find all files containing a string\n\n```sh\ngrep -Rin \"string\" .\n```\n\n`R` = recursive\n\n`i` = ignore case\n\n`n` = show the line number and content\n\n`.` = starting from the current directory\n\nUse `l` instead of `n` to show the file name only.\n\n## List running processes\n\n```sh\nps aux | grep procName\npgrep -f procName\ntop\nhtop\n```\n\n## Set an empty password for a user\n\n```sh\nsudo passwd -d username\n```\n\n## Services commands\n\n```sh\n# List running services\nls /etc/init.d\n\n# Start/stop a service\nsudo -u root bash\n/etc/init.d/<my-service> start/stop\n# if you don't find there, check\n/var/spool/cron/*\n# if not there, check:\n/etc/monit.d/*\n\n# List services listening to ports\nsudo netstat -tulpn | grep LISTEN\n```\n\n## CLI Tools\n\n- [Witowski Favorite CLI Tools](https://switowski.com/blog/favorite-cli-tools)\n\n## Shell scripts\n\n### Validation\n\n- [ShellCheck](https://www.shellcheck.net/)\n\n### Debugging\n\nPrepend the following to your script:\n\n```sh\n# Exit immediately if a command exits with a non-zero status\nset -e\n\n# Print the last failed command, line number and exit code\ntrap 'prev_cmd=$curr_cmd; prev_ln=$curr_ln; curr_cmd=$BASH_COMMAND; curr_ln=${LINENO}' DEBUG\ntrap 'echo -e $\"\\n   ERROR in ${BASH_SOURCE}:$prev_ln >>> $prev_cmd <<< FAILED with EXIT CODE $?\\n\"' EXIT\n```\n\n## Presentations from command line\n\n- [mdp](https://github.com/visit1985/mdp)\n- [tpp](https://synflood.at/tpp.html)\n- [sent](https://tools.suckless.org/sent/)\n\n## Set your terminal default editor\n\n```sh\nsudo update-alternatives --config editor\n```\n\n## cd to the previous directory\n\n```sh\ncd -\n```\n\n## Troubleshoot network issues\n\n```sh\nopenssl s_client -connect <host>:443 -servername <host>\n```\n\n## Neovim\n\nNeovim is a cross-platform fork of Vim with code highlighting, syntax checking, code completion, inlay hints, type hints, a built-in debugger, a terminal emulator, a file manager, a markdown previewer, a git client and much more. It has better defaults than Vim, for example `autoindent` and `hlsearch` (highlight all matches). It has been the most loved editor in the Stack Overflow Developer Survey for the last 2 years ([source](https://survey.stackoverflow.co/2022#integrated-development-environment)).\n\n### Install the latest version on Ubuntu\n\nUse [bob](https://github.com/MordechaiHadad/bob/releases). Example:\n\n```sh\nwget https://github.com/MordechaiHadad/bob/releases/download/<latest_version>/bob-linux-x86_64.zip\nunzip bob-linux-x86_64.zip\ncd bob-linux-x86_64/\nchmod +x bob\necho \"export PATH=\\\"~/.local/share/bob/nvim-bin:\\$PATH\\\"\" >> ~/.bashrc\nsource ~/.bashrc\n./bob install stable\n./bob use stable\n```\n\n### Setup\n\n#### LazyVim\n\nLazyVim is a popular Neovim configuration framework designed to provide users with a pre-configured, feature-rich setup for Neovim. It offers a curated set of plugins (for syntax highlighting, code completion, file navigation, git integration, etc.), sensible defaults, and optimized settings to enhance productivity and ease of use. At its core, LazyVim leverages the `lazy.nvim` plugin manager, which allows for efficient and lazy-loading of plugins, resulting in faster startup times and improved performance.\n\n1. Install a [Nerd font](https://www.nerdfonts.com/font-downloads) of your choice (e.g. Inconsolata):\n   ```sh\n   wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Inconsolata.zip\n   unzip Inconsolata.zip -d ~/.local/share/fonts\n   fc-cache -fv\n   ```\n   If you are using WSL, you need to install the font on Windows and set it in the terminal settings.\n\n1. Install LazyVim prerequisites: `sudo apt install luarocks ripgrep xclip`\n\n1. Install LazyVim following [these instructions](https://www.lazyvim.org/installation)\n\n1. Start Neovim and wait for the plugins to be installed\n\n1. Append the following lines to `~/.config/nvim/init.lua`:\n\n   ```lua\n   -- place yanked text into the global clipboard\n   vim.opt.clipboard = \"unnamedplus\"\n   ```\n\n1. Inside Neovim run `:checkhealth` and fix any issues.\n\n#### Using NvChad\n\nSet one of the [Nerd Fonts](https://www.nerdfonts.com/font-downloads) as your terminal font, then run:\n\n```sh\nrm -rf ~/.local/share/nvim/\nrm -rf ~/.config/nvim\ngit clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 && nvim\n```\n\n##### NvChad useful commands\n\n- Change theme with `space t h`\n- Install a syntax highlighter with `:TSInstall <language>`\n- Display the file tree with `Ctrl`+`n`\n- Mark a file with `m`\n- Create, rename, copy and paste a file with `a`, `r`, `c` and `p` (creating a folder is done by following the name with the slash `/`)\n- Open the find file meny with `space f f`\n- Search in the opened files names with `space f b`\n- Search in the current file with `space s`\n- Toggle the line numbers with `space n`\n- Toggle the relative line numbers with `space r n`\n- Cycle through the tabs (aka buffers) with `tab` and `shift tab`\n- Close the current tab with `space x`\n\n#### Using kickstart\n\n```sh\nsudo apt install gcc\nmkdir -p ~/.config/nvim\ngit clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim\necho \"vim.wo.relativenumber = true\" >> ~/.config/nvim/init.lua  \nnvim\n```\n\n### Vim usesul commands\n\n- Jump back to previous location `Ctrl`+`o`\n- Jump forward to next location `Ctrl`+`i`\n- Undo/Redo `u`/`Ctrl`+`r`\n- Copy current line `yy`\n- Paste line from clipboard `p`\n- Delete current line `dd`\n- Jump the next/previous word `w`/`b`\n- Select text (Visual) `v`\n- Format current selected text `gq` (comes from plugin?)\n- Change current word `cw`\n- Copy the entire file to the clipboard `ggyG`\n- Search for a word `/<word>`\n- Search for the next/previous word `n`/`N`\n\n### Learning resources\n\n- Type `vimtutor` in your terminal and follow the instructions.\n- [Vim Adventures](https://vim-adventures.com/)\n- [Vim Cheat Sheet](https://devhints.io/vim)\n- [The Primeagen: Vim As Your Editor](https://www.youtube.com/watch?v=X6AR2RMB5tE&list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R&pp=iAQB)\n- [The Primeagen: Vim Life](https://www.youtube.com/watch?v=y6VJBeZEDZU&list=PLm323Lc7iSW9CtibHhhQErDh167XfL4EU&pp=iAQB)\n\n### Troubleshooting\n\nWhen running `:checkhealth` I get a lot of errors like:\n```\ninvalid node type at position 242 for language arduino\n```\nSee [this gist](https://gist.github.com/lackovic/1916b5cc0ca22496ea3061f4ae3b5aff).\n\nIf you run `:echo nvim_get_runtime_file('parser', v:true)` and you get two parsers then you need to remove one of the two\n\n### Must have plugins\n\n- [tpope/vim-surround](https://github.com/tpope/vim-surround)\n- [phaazon/hop.nvim](https://github.com/phaazon/hop.nvim)\n\n## Arch Linux\n\n### Update the system\n\n```sh\nsudo pacman -Syu\n```\n\n- `S` = Synchronize packages. Packages are installed directly from the remote repositories, including all dependencies required to run the packages\n- `y` = Download a fresh copy of the master package database from the server(s) defined in pacman.conf\n- `u` = Upgrades all packages that are out-of-date\n\n### Search for a package\n\nTo search for example for _OpenJDK_, run:\n\n```sh\nsudo pacman -Ss OpenJDK\n```\n\n- `S` = Synchronize packages. Packages are installed directly from the remote repositories, including all dependencies required to run the packages\n- `s` = Search each package in the sync databases for names or descriptions that match regexp\n\n### Install AUR (Arch User Repository) packages\n\nFor WSL2 see [this issue](https://github.com/yuk7/ArchWSL/issues/142).\n\n1. Install the prerequisites:\n\n   ```sh\n   pacman -S --needed base-devel\n   ```\n\n1. Install Yay as AUR helper:\n\n   ```sh\n   git clone https://aur.archlinux.org/yay.git\n   cd yay/\n   makepkg -si\n   ```\n\n1. Install the package of your choice with:\n\n   ```sh\n   yay -S <package-name>\n   ```\n\nResources:\n\n- [AUR packages search](https://aur.archlinux.org/packages/)\n\n- [AUR wiki](https://wiki.archlinux.org/index.php/Arch_User_Repository)\n\n- [AUR helpers](https://wiki.archlinux.org/index.php/AUR_helpers)\n\n### Install Java through SDKMAN\n\n1. Install the prerequisites:\n\n   ```sh\n   sudo pacman -Sy which unzip zip\n   ```\n\n1. Follow the [installation instructions](https://sdkman.io/install).\n\n1. To see the list of available Java versions: it\n\n   ```sh\n   sdk list java\n   ```\n\n1. To install a particular version of Java run:\n\n   ```sh\n   sdk install java <identifier>\n   ```\n"
  },
  {
    "path": "Linux/powerlevel10k_rainbow_java.omp.json",
    "content": "{\n  \"$schema\": \"https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json\",\n  \"blocks\": [\n    {\n      \"alignment\": \"left\",\n      \"segments\": [\n        {\n          \"background\": \"#d3d7cf\",\n          \"foreground\": \"#000000\",\n          \"leading_diamond\": \"\\u256d\\u2500\\ue0b2\",\n          \"style\": \"diamond\",\n          \"template\": \" {{ if .WSL }}WSL at {{ end }}{{.Icon}} \",\n          \"type\": \"os\"\n        },\n        {\n          \"background\": \"#3465a4\",\n          \"foreground\": \"#e4e4e4\",\n          \"powerline_symbol\": \"\\ue0b0\",\n          \"properties\": {\n            \"home_icon\": \"~\",\n            \"style\": \"full\"\n          },\n          \"style\": \"powerline\",\n          \"template\": \" \\uf07c {{ .Path }} \",\n          \"type\": \"path\"\n        },\n        {\n          \"background\": \"#4e9a06\",\n          \"background_templates\": [\n            \"{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}\",\n            \"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}\",\n            \"{{ if gt .Ahead 0 }}#89d1dc{{ end }}\",\n            \"{{ if gt .Behind 0 }}#4e9a06{{ end }}\"\n          ],\n          \"foreground\": \"#000000\",\n          \"powerline_symbol\": \"\\ue0b0\",\n          \"properties\": {\n            \"branch_icon\": \"\\uf126 \",\n            \"fetch_stash_count\": true,\n            \"fetch_status\": true,\n            \"fetch_upstream_icon\": true\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \\uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \\uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \\ueb4b {{ .StashCount }}{{ end }} \",\n          \"type\": \"git\"\n        }\n      ],\n      \"type\": \"prompt\"\n    },\n    {\n      \"alignment\": \"right\",\n      \"segments\": [\n        {\n          \"background\": \"#689f63\",\n          \"foreground\": \"#ffffff\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"fetch_version\": true,\n            \"home_enabled\": true,\n            \"display_mode\": \"always\"\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} \\ue718 \",\n          \"type\": \"node\"\n        },\n        {\n          \"type\": \"java\",\n          \"style\": \"powerline\",\n          \"powerline_symbol\": \"\",\n          \"properties\": {\n            \"fetch_version\": true,\n            \"home_enabled\": true,\n            \"display_mode\": \"always\"\n          },\n          \"foreground\": \"#ffffff\",\n          \"background\": \"#4063D8\",\n          \"template\": \"  {{ .Full }}\"\n        },\n        {\n          \"background\": \"#00acd7\",\n          \"foreground\": \"#111111\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"fetch_version\": true\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \\ue627 \",\n          \"type\": \"go\"\n        },\n        {\n          \"background\": \"#4063D8\",\n          \"foreground\": \"#111111\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"fetch_version\": true\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \\ue624 \",\n          \"type\": \"julia\"\n        },\n        {\n          \"background\": \"#FFDE57\",\n          \"foreground\": \"#111111\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"display_mode\": \"files\",\n            \"fetch_virtual_env\": false\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \\ue235 \",\n          \"type\": \"python\"\n        },\n        {\n          \"background\": \"#AE1401\",\n          \"foreground\": \"#ffffff\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"display_mode\": \"files\",\n            \"fetch_version\": true\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \\ue791 \",\n          \"type\": \"ruby\"\n        },\n        {\n          \"background\": \"#FEAC19\",\n          \"foreground\": \"#ffffff\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"display_mode\": \"files\",\n            \"fetch_version\": false\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \\uf0e7\",\n          \"type\": \"azfunc\"\n        },\n        {\n          \"background_templates\": [\n            \"{{if contains \\\"default\\\" .Profile}}#FFA400{{end}}\",\n            \"{{if contains \\\"jan\\\" .Profile}}#f1184c{{end}}\"\n          ],\n          \"foreground\": \"#ffffff\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"display_default\": false\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} \\ue7ad \",\n          \"type\": \"aws\"\n        },\n        {\n          \"background\": \"#ffff66\",\n          \"foreground\": \"#111111\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"style\": \"powerline\",\n          \"template\": \" \\uf0ad \",\n          \"type\": \"root\"\n        },\n        {\n          \"background\": \"#c4a000\",\n          \"foreground\": \"#000000\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"style\": \"powerline\",\n          \"template\": \" {{ .FormattedMs }} \\uf252 \",\n          \"type\": \"executiontime\"\n        },\n        {\n          \"background\": \"#000000\",\n          \"background_templates\": [\n            \"{{ if gt .Code 0 }}#cc2222{{ end }}\"\n          ],\n          \"foreground\": \"#d3d7cf\",\n          \"invert_powerline\": true,\n          \"powerline_symbol\": \"\\ue0b2\",\n          \"properties\": {\n            \"always_enabled\": true\n          },\n          \"style\": \"powerline\",\n          \"template\": \" {{ if gt .Code 0 }}{{ reason .Code }}{{ else }}\\uf42e{{ end }} \",\n          \"type\": \"status\"\n        },\n        {\n          \"background\": \"#d3d7cf\",\n          \"foreground\": \"#000000\",\n          \"invert_powerline\": true,\n          \"style\": \"diamond\",\n          \"template\": \" {{ .CurrentDate | date .Format }} \\uf017 \",\n          \"trailing_diamond\": \"\\ue0b0\\u2500\\u256e\",\n          \"type\": \"time\"\n        }\n      ],\n      \"type\": \"prompt\"\n    },\n    {\n      \"alignment\": \"left\",\n      \"newline\": true,\n      \"segments\": [\n        {\n          \"foreground\": \"#d3d7cf\",\n          \"style\": \"plain\",\n          \"template\": \"\\u2570\\u2500\",\n          \"type\": \"text\"\n        }\n      ],\n      \"type\": \"prompt\"\n    },\n    {\n      \"segments\": [\n        {\n          \"foreground\": \"#d3d7cf\",\n          \"style\": \"plain\",\n          \"template\": \"\\u2500\\u256f\",\n          \"type\": \"text\"\n        }\n      ],\n      \"type\": \"rprompt\"\n    }\n  ],\n  \"console_title_template\": \"{{ .Shell }} in {{ .Folder }}\",\n  \"final_space\": true,\n  \"version\": 3\n}"
  },
  {
    "path": "PostgreSQL/README.md",
    "content": "# PostgreSQL CLI notes\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Contents**\n\n- [Basic psql commands](#basic-psql-commands)\n- [Basic commands for psql interactive terminal](#basic-commands-for-psql-interactive-terminal)\n- [Basic SQL queries](#basic-sql-queries)\n- [Use empty password for postgres user on Windows](#use-empty-password-for-postgres-user-on-windows)\n- [Dump data from a specific user of specific tables from a database](#dump-data-from-a-specific-user-of-specific-tables-from-a-database)\n- [See your database schema in dbdiagram.io](#see-your-database-schema-in-dbdiagramio)\n- [Set a default database to connect to](#set-a-default-database-to-connect-to)\n- [Restart PostgresQL](#restart-postgresql)\n- [External resources](#external-resources)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Basic psql commands\n\n```sh\n# Output version information\npsql -V\n\n# Connect to a host database as user\npsql -h <host> -d <db_name> -U <user>\n# default host = /var/run/postgresql\n```\n\n## Basic commands for psql interactive terminal\n\n```sh\n# List of databases\n\\l\n\n# Connect to a database\n\\c database_name\n\n# List all tables in the current database\n\\dt\n\n# List the columns details of a table\n\\d+ table_name\n\n# List all users\n\\du\n\n## Change the password for a user\n\\password username\n\n## Exit from PostgreSQL CLI\n\\q\n```\n\n## Basic SQL queries\n\n```sql\n-- List just the columns names of a table\nSELECT * FROM table_name WHERE FALSE;\n\n-- Specify a number of records to return\nSELECT * FROM table_name LIMIT <number>;\n\n-- Clear all the data from a database\nDROP DATABASE \"db_name\";\nCREATE DATABASE \"db_name\";\n\n-- List columns with indexes for a table\nSELECT * FROM pg_indexes WHERE tablename = 'mytable';\n\n-- List columns names, types and nullability for a table\nSELECT column_name, data_type, is_nullable\nFROM information_schema.columns\nWHERE table_name = 'mytable';\n```\n\n## Use empty password for postgres user on Windows\n\nEdit your `C:\\Program Files\\PostgreSQL\\10\\data\\pg_hba.conf` and\nreplace the IPv4 and IPv6 local connections with:\n```sh\n# TYPE  DATABASE        USER            ADDRESS                 METHOD\n\n# IPv4 local connections:\nhost    all             all             127.0.0.1/32            trust\n# IPv6 local connections:\nhost    all             all             ::1/128                 trust\n```\n\n## Dump data from a specific user of specific tables from a database\n\n```sh\npg_dump -U username -t table1 -t table2 -t table3 -O --column-inserts --data-only database_name\n```\n\n## See your database schema in dbdiagram.io\n\nYou have two options:\n\n* Run [this query](https://github.com/matthewoldham/dbdiagram.io-ddl-queries/blob/master/sql/postgresql.sql) to generate the DDL\n* Run one of the following and import it in dbdiagram.io:\n```\npg_dump -F t -f dump.bin database-name\npg_dump -F t -p dump.sql database-name\n```\n\n## Set a default database to connect to\n\nIn your `~/.bashrc` or similar:\n\n```sh\nexport PGDATABASE=my-database\n```\n\n## Restart PostgresQL\n\n```sh\n/etc/init.d/postgresql restart\n```\n\n## External resources\n\n* [PostgreSQL cheatsheet](https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546)\n"
  },
  {
    "path": "PostgreSQL/postgresql-to-dbdiagram.sql",
    "content": "-- Backup copy of the query to generate dbdiagram.io DDL, copied from:\n-- https://github.com/matthewoldham/dbdiagram.io-ddl-queries/blob/master/sql/postgresql.sql\n\nWITH tableKeys AS (\n   SELECT t.constraint_schema,\n          t.table_name,\n          c.column_name,\n          'PK' AS column_key\n     FROM information_schema.table_constraints t\n     JOIN information_schema.constraint_column_usage c \n       ON c.constraint_schema = t.constraint_schema\n      AND c.table_name = t.table_name\n      AND c.constraint_name = t.constraint_name\n    WHERE t.constraint_type = 'PRIMARY KEY'\n),\ntableColumns AS (\n   SELECT t.table_schema,\n          t.table_name,\n          c.column_name,\n          COALESCE(tk.column_key::TEXT,'') AS column_pk,\n          CASE\n             WHEN data_type IN ('USER-DEFINED',\n                                'timestamp without time zone',\n                                'timestamp with time zone',\n                                 'character varying') THEN udt_name\n             ELSE data_type\n          END AS column_type\n     FROM information_schema.columns c\n     JOIN information_schema.tables t\n       ON c.table_schema = t.table_schema\n      AND c.table_name = t.table_name\n     LEFT JOIN tableKeys tk\n       ON tk.constraint_schema = t.table_schema\n      AND tk.table_name = t.table_name\n      AND tk.column_name = c.column_name\n    WHERE t.table_type = 'BASE TABLE'\n    ORDER BY t.table_name, c.ordinal_position\n),\ntableDefs AS(\n   SELECT table_schema,\n          CONCAT_WS(' ','Table',table_name,'{',CHR(10)) AS table_prefix,\n          ARRAY_TO_STRING(ARRAY_AGG(CONCAT_WS(' ','  ',QUOTE_IDENT(column_name),column_type,column_pk)),CHR(10)) AS column_list,\n          CONCAT(CHR(10),'}',CHR(10)) AS table_suffix\n     FROM tableColumns\n    GROUP BY 1,2,4\n    ORDER BY 2\n),                      \nrelDefs AS (\n   SELECT tc.table_schema,\n          CONCAT('Ref: ',tc.table_name,'.',kcu.column_name,' > ',ccu.table_name,'.',ccu.column_name,CHR(10)) AS relationships\n     FROM information_schema.table_constraints AS tc \n     JOIN information_schema.key_column_usage AS kcu\n       ON tc.constraint_name = kcu.constraint_name\n      AND tc.table_schema = kcu.table_schema\n     JOIN information_schema.constraint_column_usage AS ccu\n       ON ccu.constraint_name = tc.constraint_name\n      AND ccu.table_schema = tc.table_schema\n    WHERE tc.constraint_type = 'FOREIGN KEY' \n    ORDER BY tc.table_name,\n             kcu.column_name,\n             ccu.table_name,\n             ccu.column_name\n)\nSELECT CONCAT(table_prefix,column_list,table_suffix) AS ddl\n  FROM tableDefs\n WHERE table_schema = 'public'\nUNION ALL\nSELECT relationships AS ddl\n  FROM relDefs\n WHERE table_schema = 'public'"
  },
  {
    "path": "README.md",
    "content": "# Notes\n\nA collection of personal notes about programming, operating systems and tools.\n\nPull requests for wrong, suboptimal or incomplete information are very welcome!\n"
  },
  {
    "path": "Redis/README.md",
    "content": "# Redis\n\n## Basic commands\n\n```sh\n# Set a key and assign it a value\nredis-cli SET <key> <value>\n\n# Get a value associated to a key\nredis-cli GET <key>\n\n# List all keys\nredis-cli KEYS '*'\n\n# Delete all keys of all databases\nredis-cli FLUSHALL\n\n# Delete all keys of the currently selected database\nredis-cli FLUSHDB\n\n# Delete all keys of the specified database\nredis-cli -n <database_number> FLUSHDB\n```\n\n## Troubleshooting\n\n1. check the configuration file of the app (e.g. `/opt/<appname>/config/redis.yaml`) for hostnames, ports and sentinels\n\n1. verify that Redis is running with `redis-cli ping` (you should get `PONG` back)\n\n1. check the connection with the sentinels with (you should get `PONG` back):\n\n   ```\n   nc sentinel.hostname.net 6388\n   ping\n   ```\n\n1. check the local network ports `netstat -an | grep :6379`\n\n1. check whether Redis is running in a Docker container `docker container ls`\n\n1. check the app that is using Redis log with `tail /var/log/<appname>/<servicename> -F`\n"
  },
  {
    "path": "Ruby on Rails/README.md",
    "content": "# Ruby on Rails\n\n*Contents*\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Introduction](#introduction)\n- [Debugging](#debugging)\n- [Testing](#testing)\n- [Generate your database diagram from Rails schema](#generate-your-database-diagram-from-rails-schema)\n- [Gems management](#gems-management)\n  - [List installed gems](#list-installed-gems)\n  - [Know the version of an installed gem](#know-the-version-of-an-installed-gem)\n  - [Clean up unused gems in your bundler directory](#clean-up-unused-gems-in-your-bundler-directory)\n  - [Uninstall all Ruby gems](#uninstall-all-ruby-gems)\n  - [Display information about the RubyGems environment](#display-information-about-the-rubygems-environment)\n  - [Change version of an installed gem](#change-version-of-an-installed-gem)\n- [Rails console](#rails-console)\n  - [Enter Rails console](#enter-rails-console)\n  - [Enable syntax highlighting](#enable-syntax-highlighting)\n  - [CRUD database operations](#crud-database-operations)\n- [Migrations data types](#migrations-data-types)\n- [Resources](#resources)\n- [Visual Studio Code](#visual-studio-code)\n  - [Recommended extensions](#recommended-extensions)\n  - [Format .erb files in VsCode](#format-erb-files-in-vscode)\n- [RubyMine](#rubymine)\n  - [Windows](#windows)\n    - [Installation](#installation)\n    - [Setup](#setup)\n  - [Find in path regex](#find-in-path-regex)\n  - [Favorite plugins](#favorite-plugins)\n  - [Install a theme from a jar file](#install-a-theme-from-a-jar-file)\n  - [Select a theme](#select-a-theme)\n  - [Navigate back and forward using mouse buttons clicks](#navigate-back-and-forward-using-mouse-buttons-clicks)\n  - [Enable mouse scroll zooming](#enable-mouse-scroll-zooming)\n  - [Shortcuts](#shortcuts)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Introduction\n\n**Ruby** is an interpreted scripting object-oriented programming language. **Ruby on Rails** (\"RoR\") is an open-source framework, written in Ruby, for implementing web applications.\n\n## Debugging\n\n1. Insert `binding.pry` before the line you want the execution to be paused\n1. Run your app or test\n1. The execution will pause where you inserted the binding and will give you a rails console.\n\n- See [Debugging With Pry](https://learn.co/lessons/debugging-with-pry)\n\n## Testing\n\n```shell\n# Run (focus on) one test only out of a suite of tests\nbundle exec rspec path/file_spec.rb:32\n```\n\n## Generate your database diagram from Rails schema\n\n1. Open [dbdiagram.io](https://dbdiagram.io/)\n1. Click Import → From Rails (schema.rb)\n1. Paste (or upload) your schema.rb\n\n## Gems management\n\n### List installed gems\n\n```sh\ngem list --local\n```\n\n### Know the version of an installed gem\n\n```sh\ngem list --local | grep your-gem-name\n```\n\n### Clean up unused gems in your bundler directory\n\n```sh\n# Print the changes, but do not clean the unused gems.\nbundle clean --dry-run\n\n# Force a clean even if --path is not set.\nbundle clean --force\n```\n\n- [Docs](https://bundler.io/man/bundle-clean.1.html)\n\n### Uninstall all Ruby gems\n\n```sh\n# Make sure you upgrade your Rubygems:\ngem update --system\n\n# Uninstall all gems:\ngem uninstall --all\n```\n\n### Display information about the RubyGems environment\n\n```sh\ngem env\n```\n\n### Change version of an installed gem\n\n1. Install the new version (e.g. `1.17.3`) with:\n\n   ```sh\n   gem install bundler:1.17.3\n   ```\n\n1. uninstall the previously existing version with:\n\n   ```sh\n   gem uninstall bundler\n   ```\n\n## Rails console\n\n### Enter Rails console\n\n```shell\n# Using your global version of Rails:\nrails c\n\n# Testing out some code without changing any data:\n# (modifications will be rolled back on exit)\nrails c --sandbox\n\n# Using the local version of Rails defined in your Gemfile:\nbundle exec rails c\n```\n\n### Enable syntax highlighting\n\nUse [pry](https://github.com/pry/pry)\n\n### CRUD database operations\n\n```ruby\n# Create\nUser.create(name: \"Douglas\")\n\n# Read by ID (returns only one object if found, if not raises an exception):\nUser.find(42)\n# Read by name (returns only one object if found, if not returns nil):\nUser.find_by(name: \"Douglas\")\n# Read by name (returns an array of objects if found, if not returns an empty array):\nUser.where(gender: \"Male\")\n\n# Update\nUser.find(42).update_attribute(:name, \"Douglas\")\n\n# Delete only the current object record:\nUser.delete(42)\nUser.delete_all(age: 49)\n# Delete the current object record and all its descendants records:\nUser.destroy(42)\nUser.destroy_all(age: 49)\n```\n\n- [Docs](https://www.rubydoc.info/docs/rails/4.1.7/ActiveRecord/Relation)\n\n## Migrations data types\n\n```rb\ncreate_table 'example' do |t|\n  t.integer :int                  # int (4 bytes, max 2,147,483,647)\n  t.integer :int1,  limit: 1   # tinyint (1 byte, -128 to 127)\n  t.integer :int2,  limit: 2   # smallint (2 bytes, max 32,767)\n  t.integer :int3,  limit: 3   # mediumint (3 bytes, max 8,388,607)\n  t.integer :int4,  limit: 4   # int (4 bytes)\n  t.integer :int5,  limit: 5   # bigint (8 bytes, max 9,223,372,036,854,775,807)\n  t.integer :int8,  limit: 8   # bigint (8 bytes)\n  t.integer :int11, limit: 11  # int (4 bytes)\n\n  t.timestamp    :my_date         # timestamp without time zone\n  t.timestamptz  :my_other_date   # timestamp with time zone\n\n  t.string       :str,                 # character varying(255)\n  t.string       :str, length: 255     # character varying(512)\n  t.string       :str, length: 1024    # character varying(1024)\nend\n``` \n\n- [Source](https://gist.github.com/icyleaf/9089250)\n\n## Resources\n\n- [The Ruby Style Guide](https://github.com/rubocop-hq/ruby-style-guide)\n- [Ruby Style Guide](https://github.com/github/rubocop-github/blob/master/STYLEGUIDE.md)\n\n## Visual Studio Code\n\n### Recommended extensions\n\n- [endwise](https://marketplace.visualstudio.com/items?itemName=kaiwood.endwise)\n- [Ruby Solargraph](https://marketplace.visualstudio.com/items?itemName=castwide.solargraph) (`gem install solargraph` required)\n- [Gem Lens](https://marketplace.visualstudio.com/items?itemName=ninoseki.vscode-gem-lens)\n\n### Format .erb files in VsCode\n\nThis is not a good solution but it is the best I could find.\nAdd to your workspace settings:\n```json\n\"files.associations\": {\n   \"*.html.erb\": \"html\"\n}\n```\n\n- [Prettier .erb support request](https://github.com/prettier/plugin-ruby/issues/371)\n\n## RubyMine\n\n### Windows\n\n#### Installation\n\nThe easiest way to install it is with Chocolatey:\n\n```powershell\nchoco install rubymine -y\n```\n\n#### Setup\n\n1. Install Ruby with Chocolatey, choosing from the [available versions](https://chocolatey.org/packages/ruby#versionhistory)\n\n1. Run `ridk install` and choose options 1, 2 and 3 when asked\n\n1. Run `bundle install` in your project directory (if some of the gems installation fails, try commenting them out from your `Gemfile`)\n"
  },
  {
    "path": "Rust/README.md",
    "content": "# Rust\n\nTo create an API service in Rust on Windows, install Rust with:\n\n```powershell\nwinget install -e --id Rustlang.Rustup\nrustup toolchain install stable-x86_64-pc-windows-gnu\nrustup default stable-x86_64-pc-windows-gnu\n```\n\nFollow Rocket [Getting Started](https://rocket.rs/v0.4/guide/getting-started/) guide.\n\nAs IDE use Visual Studio Code with the [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) extesion."
  },
  {
    "path": "Visual Studio Code/README.md",
    "content": "# Visual Studio Code\n\n_Table of Contents_\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Useful workspace settings](#useful-workspace-settings)\n- [Favorite shortcuts](#favorite-shortcuts)\n- [Favorite user settings](#favorite-user-settings)\n- [Prevent the Java Platform extension from creating files in the bin directory](#prevent-the-java-platform-extension-from-creating-files-in-the-bin-directory)\n- [Top Extensions](#top-extensions)\n- [Useful Extensions](#useful-extensions)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Useful workspace settings\n\n```js\n// Hide VsCode configuration files from sidebar explorer\n\"files.exclude\": { \".vscode\": true },\n\n// Use relative path for Typescript auto-imports\n\"typescript.preferences.importModuleSpecifier\": \"relative\"\n\n// Use single quotes in Typescript auto-imports\n\"typescript.preferences.quoteStyle\": \"single\"\n\n// Automatically update TypeScript import paths on file rename/move\n\"typescript.updateImportsOnFileMove.enabled\": \"always\"\n```\n\n## Favorite shortcuts\n\n| Key                       | Command                           |\n| ------------------------- | --------------------------------- |\n| `Ctrl+Shift+P`            | Show all commands                 |\n| `Ctrl+P`                  | Go to file..., quick open         |\n| `Ctrl+Shift+O`            | Go to symbol in the current file  |\n| `Ctrl+T`                  | Go to symbol in the whole project |\n| `Ctrl+K M`                | Change language mode              |\n| `Ctrl+K O`                | Show opened file in new window    |\n| `Ctrl+Shift+P dupl Enter` | Duplicate workspace in new window |\n| `Shift+Alt+Down`          | Copy line down / Duplicate line   |\n| `Ctrl+Shift+N`            | New window                        |\n| `Ctrl+R`                  | Open recent folder                |\n| `Ctrl+.`                  | Show the quickfix menu            |\n| `Ctrl+,`                  | Open settings                     |\n| `Ctrl+Shift+.`            | Focus and select breadcrumbs      |\n| `Ctrl+Shift+G G`          | Show source control               |\n| `Ctrl+Shift+E`            | Show and focus explorer           |\n| `Ctrl+B`                  | Toggle sidebar visibility         |\n| `Ctrl+0`                  | Focus into sidebar                |\n| `Ctrl+1`                  | Focus into editor                 |\n| `Ctrl+/`                  | Toggle comment on selected lines  |\n\n[All shortcuts](https://code.visualstudio.com/docs/getstarted/keybindings)\n\n## Favorite user settings\n\n```js\n{\n  \"breadcrumbs.enabled\": true,\n  \"diffEditor.ignoreTrimWhitespace\": true,\n  \"editor.cursorSurroundingLines\": 5,\n  \"editor.fontFamily\": \"Inconsolata, 'Input Mono Light', 'Fira Code', Consolas, 'Courier New', monospace\",\n  \"editor.fontSize\": 16,\n  \"editor.minimap.enabled\": true,\n  \"editor.minimap.scale\": 3,\n  \"editor.mouseWheelZoom\": true,\n  \"explorer.confirmDelete\": false,\n  \"explorer.confirmDragAndDrop\": false,\n  \"files.autoSave\": \"onWindowChange\",\n  \"window.title\": \"${rootName}\",\n  \"window.zoomLevel\": 0,\n  \"workbench.editor.wrapTabs\": true,\n  \"workbench.settings.useSplitJSON\": true,\n  \"workbench.settings.editor\": \"json\",\n  \"java.autobuild.enabled\": false,\n}\n```\n\n## Prevent the Java Platform extension from creating files in the bin directory\n\nSet `java.autobuild.enabled` to false in your settings.\n\n[Source](https://github.com/redhat-developer/vscode-java/issues/634#issuecomment-2485241295)\n\n## Top Extensions\n\n- [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments)\n- [Bracket Pair Colorizer](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer)\n- [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)\n- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)\n- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)\n- [Partial Diff](https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff)\n- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n- [Sort lines](https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines)\n- [Surround](https://marketplace.visualstudio.com/items?itemName=yatki.vscode-surround)\n- [Text Marker (Highlighter)](https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker)\n- [Selected Lines Count](https://marketplace.visualstudio.com/items?itemName=gurumukhi.selected-lines-count)\n- [Rewrap](https://marketplace.visualstudio.com/items?itemName=stkb.rewrap)\n\n## Useful Extensions\n\n- [Bookmarks](https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks)\n- [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)\n- [GraphQL for VSCode](https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode)\n- [jumpy](https://marketplace.visualstudio.com/items?itemName=wmaurer.vscode-jumpy)\n- [Log File Highlighter](https://marketplace.visualstudio.com/items?itemName=emilast.LogFileHighlighter)\n- [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)\n- [Paste JSON as Code](https://marketplace.visualstudio.com/items?itemName=quicktype.quicktype)\n- [PowerShell](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)\n- [Project Snippets](https://marketplace.visualstudio.com/items?itemName=rebornix.project-snippets)\n- [Subtitles Editor](https://marketplace.visualstudio.com/items?itemName=pepri.subtitles-editor)\n- [VS Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare)\n"
  },
  {
    "path": "Windows/AutoHotkey.ahk",
    "content": "﻿; AutoHotkey is a scripting language for Microsoft Windows which provides\n; keyboard shortcuts that allows users to automate repetitive tasks.\n;\n; Hotkey Modifier Symbols\n; https://www.autohotkey.com/docs/Hotkeys.htm#Symbols\n;\n; 1. Install it with Chocolatey: cinst autohotkey -y\n; 2. Copy this file (AutoHotkey.ahk) to %UserProfile%\\Documents\n; 3. Create a shortcut to AutoHotkey in shell:startup\n; 4. Run AutoHotkey\n;\n; --- Web pages ---------------------------------------------------------------\n\n; Ctrl+Alt+C = opens Google Calendar in a new window of Chrome\n; Ctrl+Alt+D = opens Google Drive in a new window of Chrome\n; Ctrl+Alt+G = opens Gmail in a new window of Chrome\n; Ctrl+Alt+M = opens Google Maps in a new window of Chrome\n; Ctrl+Alt+T = opens Google Translate in a new window of Chrome\n\n^!c::Run Chrome.exe \"https://calendar.google.com/\" \" --new-window \"\n^!d::Run Chrome.exe \"https://drive.google.com/\" \" --new-window \"\n^!g::Run Chrome.exe \"https://mail.google.com/\" \" --new-window   \"\n^!m::Run Chrome.exe \"https://www.google.ee/maps/\" \" --new-window \"\n^!j::Run Chrome.exe \"https://keep.google.com/\" \" --new-window \"\n^!t::Run Chrome.exe \"https://translate.google.com/\" \" --new-window \"\n\n; --- Local apps --------------------------------------------------------------\n\n; Ctrl+Alt+K = launches or brings to front KeePass\n^!k::\nIfWinExist, KeePass\nWinActivate\nelse\nRun \"C:\\Program Files\\KeePass Password Safe 2\\KeePass.exe\"\nreturn\n\n; --- File Explorer -----------------------------------------------------------\n\n; F4 = sets view to details and all columns to fit width\n\nF4::\nsend,{LCtrl down}{LShift down}6{LCtrl up}{LShift up}\nsend,{LCtrl down}{NumpadAdd}{LCtrl up}\nreturn\n\n; --- Acronyms ----------------------------------------------------------------\n\n::bbl::be back later\n::brb::be right back\n::btw::by the way\n\n; --- SQL ---------------------------------------------------------------------\n\n::sfr::SELECT * FROM\n:o:slk::LIKE '%%'{Left 2}\n\n; --- Markdown --------------------------------------------------------------------\n\n:o:mkc::````{Left 1}\n:o:mkbc::```````n`n`````` {Up 1}\n\n; --- System ------------------------------------------------------------------\n\n; Win+F12 = Puts the computer to sleep\n^#F12::\n    ; Sleep/Suspend:\n    DllCall(\"PowrProf\\SetSuspendState\", \"int\", 0, \"int\", 0, \"int\", 0)\n    ; Hibernate:\n    ;DllCall(\"PowrProf\\SetSuspendState\", \"int\", 1, \"int\", 0, \"int\", 0)\n    Return\n\n; --- Typography ------------------------------------------------------------------\n\n<^>!,:: Send, {Text}~  ; , VK=BC SC=033 ~={U+223C}\n<^>!.:: Send, {Text}`` ; . VK=BE SC=034 `={U+0060}\n<^>!-:: Send, {Text}—  ; , VK=BD SC=035 —={U+2014}\n"
  },
  {
    "path": "Windows/AutoHotkey2.ahk",
    "content": "﻿; AutoHotkey is a scripting language for Microsoft Windows which provides\n; keyboard shortcuts that allows users to automate repetitive tasks.\n;\n; Hotkey Modifier Symbols\n; https://www.autohotkey.com/docs/Hotkeys.htm#Symbols\n;\n; 1. Install it with winget: winget install -e --id AutoHotkey.AutoHotkey\n; 2. Copy this file to shell:startup\n; 3. Run AutoHotkey\n\n; --- Legendd -----------------------------------------------------------------\n\n; ^ = ctrl\n; ! = alt\n; + = shift\n; # = lwin|rwin\n; ^!+# = Hyper = (lwin|rwin)+ctrl+alt+shift\n\n; --- Disable Windows hotkeys -------------------------------------------------\n\n#w::return ; news feed\n^!+#i::return ; system settings\n^!+#+::return ; zoom\n^!+#f::return ; feedback hub\n^!+#,::return ; show open windows transparent\n^!+#o::return ; outlook\n^!+#d::return ; OneDrive\n^!+#n::return ; OneNote\n^!+#y::return ; Yammer Viva Engage\n!r::return ; Nvidia overlay\n; ^!+#w::return ; pen settings (commented because reassigned below)\n; ^!+#c::return ; cortana/copilot (commented because reassigned below)\n; ^!+#g::return ; Game Bar Xbox (commented because reassigned below)\n; ^!+#k::return ; Connect (commented because reassigned below)\n; #v::return ; Clipboard history\n; #p::return ; monitor settings\n; #a::return ; notification sidebar\n; #r::return ; run dialog\n; #l::return ; sign out\n; #.::return ; Emojis\n\n; --- Web pages ---------------------------------------------------------------\n\n; Hyper+C = opens Google Calendar in a new window of Chrome\n; Hyper+D = opens Google Drive in a new window of Chrome\n; Hyper+G = opens Gmail in a new window of Chrome\n; Hyper+M = opens Google Maps in a new window of Chrome\n; Hyper+T = opens Google Translate in a new window of Chrome\n\n^!+#c::Run(\"Chrome.exe `\"https://calendar.google.com/`\" `\" --new-window `\"\")\n^!+#g::Run(\"Chrome.exe `\"https://mail.google.com/`\" `\" --new-window   `\"\")\n^!+#m::Run(\"Chrome.exe `\"https://www.google.ee/maps/`\" `\" --new-window `\"\")\n^!+#j::Run(\"Chrome.exe `\"https://keep.google.com/`\" `\" --new-window `\"\")\n^!+#t::Run(\"Chrome.exe `\"https://translate.google.com/`\" `\" --new-window `\"\")\n^!+#w::Run(\"Chrome.exe `\"https://web.whatsapp.com/`\" `\" --new-window `\"\")\n^!+#b::Run(\"C:\\Program Files\\Bambu Studio\\bambu-studio.exe\")\n^!+#s::Run(\"ms-settings:sound\")\n^!+#x::\n{\n    if WinExist(\"Telegram\")\n        WinActivate()\n    else\n        Run(\"`\"C:\\Users\\marco\\AppData\\Roaming\\Telegram Desktop\\Telegram.exe`\"\")\n    return\n}\n\n; --- Local apps --------------------------------------------------------------\n\n; Hyper+K = launches or brings to front KeePass\n^+#!k::\n{\n    if WinExist(\"KeePass\")\n        WinActivate()\n    else\n        Run(\"`\"C:\\Program Files\\KeePass Password Safe 2\\KeePass.exe`\"\")\n    return\n}\n\n; --- File Explorer -----------------------------------------------------------\n\n; F4 = sets view to details and all columns to fit width\nF4::\n{\n    Send(\"{LCtrl down}{LShift down}6{LCtrl up}{LShift up}\")\n    Send(\"{LCtrl down}{NumpadAdd}{LCtrl up}\")\n    return\n}\n\n; --- Acronyms ----------------------------------------------------------------\n\n::bbl::be back later\n::brb::be right back\n::btw::by the way\n\n; --- SQL ---------------------------------------------------------------------\n\n::sfr::SELECT * FROM\n:o:slk::LIKE '%%'{Left 2}\n\n; --- Markdown ----------------------------------------------------------------\n\n:o:mkc::````{Left 1}\n:o:mkbc::```````n`n`````` {Up 1}\n\n; --- System ------------------------------------------------------------------\n\n; Win+F12 = Puts the computer to sleep\n; ^#F12::\n; { \n;     ; Sleep/Suspend:\n;     DllCall(\"PowrProf\\SetSuspendState\", \"int\", 0, \"int\", 0, \"int\", 0)\n;     ; Hibernate:\n;     ;DllCall(\"PowrProf\\SetSuspendState\", \"int\", 1, \"int\", 0, \"int\", 0)\n;     return\n; }\n\n; --- Typography --------------------------------------------------------------\n\n; Associates Alt Gr + , with ~ (, VK=BC SC=033 ~={U+223C})\n;<^>!,::Send(\"{Text}~\")\n\n; Associates Alt Gr + . with ` (. VK=BE SC=034 `={U+0060})\n;<^>!.::Send(\"{Text}``\")\n\n; Associates Alt Gr + - with — (- VK=BD SC=035 —={U+2014})\n;<^>!-::Send(\"{Text}—\")\n\n; Replaces § with ~\n;+SC02B::~\n; Replaces ç with `\n;+SC027::`\n"
  },
  {
    "path": "Windows/Chocolatey/Profile.ps1",
    "content": "# Include it in your PowerShell profile to publish Chocolatey packages\n\n$ChocolateyProfile = \"$env:ChocolateyInstall\\helpers\\chocolateyProfile.psm1\"\nif (Test-Path($ChocolateyProfile)) {\n  Import-Module \"$ChocolateyProfile\"\n}\n"
  },
  {
    "path": "Windows/Chocolatey/README.md",
    "content": "# Chocolatey\n\n[Chocolatey](https://chocolatey.org/) is a package manager for Windows.\n\n## Install a list of packages in bulk\n\n```powershell\ncinst .\\packages.config -y\n```\n\nSee [`.\\packages.config`](packages.config) for reference.\n\n## Update all installed software\n\n```powershell\ncup all -y\n```\n\n## List installed software\n\n```powershell\nclist -l\n```\n\n## Install a specific version\n\n```powershell\nchoco install bulkrenameutility --version=3.4.0.0 -y\n```\n\n## Pin a package to suppress upgrades\n\n```powershell\nchoco pin add -n=ruby\n```\n\n- [Source](https://superuser.com/a/972614/54747)\n"
  },
  {
    "path": "Windows/Chocolatey/cdeps.ps1",
    "content": "$packages = Get-ChildItem C:\\ProgramData\\chocolatey\\lib\\ -Recurse  *.nuspec | select fullname,name \nforeach($p in $packages){\n        [XML]$xml=get-content $p.fullname\n        $dependencies = $xml.package.metadata.dependencies.dependency\n        foreach($d in $dependencies){\n\t        $obj = New-Object -TypeName psobject\n\t        $obj | Add-Member -MemberType NoteProperty -name package  -Value $xml.package.metadata.id\n\t        $obj | Add-Member -MemberType NoteProperty -name packageversion  -Value $xml.package.metadata.version\n\t        $obj | Add-Member -MemberType NoteProperty -name dependency  -Value  $d.id\n\t        $obj | Add-Member -MemberType NoteProperty -name dependencyversion  -Value  $d.version\n\t        $obj\n        }\n}"
  },
  {
    "path": "Windows/Chocolatey/packages.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n\n    <!-- common -->\n    <package id=\"7zip\" />\n    <package id=\"adobereader\" />\n    <package id=\"dropbox\" />\n    <package id=\"emule\" />\n    <package id=\"fsviewer\" />\n    <package id=\"googlechrome\" />\n    <package id=\"libreoffice-fresh\" />\n    <package id=\"qbittorrent\" />\n    <package id=\"shutup10\" />\n    <package id=\"teamviewer\" />\n    <package id=\"telegram\" />\n\n    <!-- development -->\n    <package id=\"docker-desktop\" />\n    <package id=\"inconsolata\" />\n    <package id=\"jetbrainsmono\" />\n    <package id=\"poshgit\" />\n    <package id=\"tortoisegit\" />\n    <package id=\"vscode\" />\n\n    <!-- command line tools -->\n    <package id=\"exiftool\" />\n    <package id=\"ffmpeg\" />\n    <package id=\"git\" />\n    <package id=\"grep\" />\n    <package id=\"microsoft-windows-terminal\" />\n    <package id=\"nvm\" />\n    <package id=\"wget\" />\n\n    <!-- images & video editors -->\n    <package id=\"audacity\" />\n    <package id=\"avidemux\" />\n    <package id=\"gimp\" />\n    <package id=\"inkscape\" />\n    <package id=\"shotcut\" />\n\n    <!-- gaming -->\n    <package id=\"discord\" />\n    <package id=\"epicgameslauncher\" />\n    <package id=\"nvidia-display-driver\" />\n    <package id=\"origin\" />\n    <package id=\"steam\" />\n    <package id=\"uplay\" />\n\n    <!-- multimedia -->\n    <package id=\"aimp\" />\n    <package id=\"k-litecodecpackmega\" />\n    <package id=\"spotify\" />\n\n    <!-- productivity -->\n    <package id=\"autohotkey\" />\n    <package id=\"bulkrenameutility\" />\n    <package id=\"ccleaner\" />\n    <package id=\"freefilesync\" />\n    <package id=\"keepass\" />\n    <package id=\"keepass-plugin-favicon\" />\n    <package id=\"linkshellextension\" />\n    <package id=\"nordvpn\" />\n    <package id=\"openvpn\" />\n    <package id=\"partitionwizard\" />\n    <package id=\"pasteintofile\" />\n    <package id=\"patchcleaner\" /> <!-- Windows Installer directory cleaner -->\n    <package id=\"powertoys\" />\n    <package id=\"procexp\" /> <!-- Shows handles and DLLs opened or loaded by processes -->\n    <package id=\"rufus\" /> <!-- Creates bootable USB flash drives -->\n    <package id=\"sizer\" /> <!-- Resizes windows to exact sizes -->\n    <package id=\"treesizefree\" />\n\n</packages>"
  },
  {
    "path": "Windows/PowerShell/README.md",
    "content": "# PowerShell \n\nTable of Contents\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Installation](#installation)\n- [Know PowerShell version](#know-powershell-version)\n- [Registry keys CRUD operations](#registry-keys-crud-operations)\n- [Get hardware info](#get-hardware-info)\n- [Add a timestamp to your prompt](#add-a-timestamp-to-your-prompt)\n- [Shortcuts](#shortcuts)\n  - [Quickly open PowerShell as Administrator](#quickly-open-powershell-as-administrator)\n  - [Use CTRL + D to exit PowerShell console](#use-ctrl--d-to-exit-powershell-console)\n- [List only files and folders names in the current directory](#list-only-files-and-folders-names-in-the-current-directory)\n- [Add git integration](#add-git-integration)\n- [Set the default starting directory](#set-the-default-starting-directory)\n- [Enable partial matching of a command with up and down keys](#enable-partial-matching-of-a-command-with-up-and-down-keys)\n- [Have syntax highlighting](#have-syntax-highlighting)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nPowerShell 7 is a modern, cross-platform version of PowerShell that can run on Windows, Linux, and macOS, unlike version 5 which is limited to Windows. It offers improved performance, new features and better error handling. PowerShell 7 is actively developed and maintained, while version 5 only receives security updates. PowerShell 7 installs to a new directory and runs side-by-side with Windows PowerShell 5.\n\nTo install it run:\n\n```powershell\nwinget install -h --id Microsoft.PowerShell\n```\n\nFor a better experience, install also the [PowerShell Toys](https://github.com/lackovic/PSToys).\n\n## Know PowerShell version\n\n```powershell\n$PSVersionTable\n```\n\n## Registry keys CRUD operations\n\n```powershell\n# To read a registry key:\nGet-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\\Test\\One\\Two\\Three\n\n# To create or update a registry key default value:\nSet-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\\Test\\One\\Two\\Three -Name '(Default)' -Value 'NewValue'\n\n# To append something to an existing registry key default value:\n$MyRegKey = Get-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\\Test\\One\\Two\\Three\n$NewValue = $MyRegKey.'(Default)' + 'Something'\nSet-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\\Test\\One\\Two\\Three -Name '(Default)' -Value $NewValue\n\n# To delete a registry key and all its subkeys:\nRemove-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\\Test\\One\\Two\\Three -Recurse \n```\n\n## Get hardware info\n\n```powershell\n# Computer brand and model\nGet-CimInstance Win32_ComputerSystem | Format-List Manufacturer, Model\n\n# Motherboard\nGet-CimInstance Win32_Baseboard | Format-List Manufacturer, SerialNumber, Version, Product\n\n# BIOS\nGet-CimInstance Win32_BIOS | Format-List Manufacturer, Version, ReleaseDate, SMBIOSBIOSVersion, SMBIOSMajorVersion, SMBIOSMinorVersion, SystemBiosMajorVersion, SystemBiosMinorVersion\n\n# CPU\nGet-CimInstance Win32_Processor | Format-List DeviceID, LoadPercentage, MaxClockSpeed, ProcessorType, SocketDesignation, Description, Name, CurrentClockSpeed, Manufacturer, NumberOfCores, NumberOfEnabledCore, NumberOfLogicalProcessors, ProcessorId, ThreadCount\n\n# Graphic card\nGet-CimInstance Win32_VideoController | Format-List AdapterCompatibility, Caption, Description, Name, PNPDeviceID, VideoModeDescription, VideoProcessor\n\n# Drives / storage\nGet-WmiObject Win32_DiskDrive | Select Model, SerialNumber, Size, MediaType\n\n# RAM\nGet-CimInstance Win32_PhysicalMemory | Format-List Manufacturer, PartNumber, SerialNumber, Tag, BankLabel, Capacity, Speed, ConfiguredClockSpeed, DeviceLocator\n\n# Operating System\nGet-CimInstance Win32_OperatingSystem | Format-List Name, InstallDate, LastBootUpTime, NumberOfUsers, Version, BuildNumber, SerialNumber\n```\n\n## Add a timestamp to your prompt\n\nSee prompt renderers posh-git in [./Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1)\n\n## Shortcuts\n\n### Quickly open PowerShell as Administrator\n\n`Ctrl`+`X` `A`\n\n### Use CTRL + D to exit PowerShell console\n\nSee [./Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1)\n\n## List only files and folders names in the current directory\n\n```powershell\ndir | Select-Object Name\n```\n\n## Add git integration\n\nSee prompt renderers in [./Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1)\n\n## Set the default starting directory\n\nSee [./Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1)\n\n## Enable partial matching of a command with up and down keys\n\nAdd to your profile (e.g. - `~\\Documents\\PowerShell\\Microsoft.PowerShell_profile.ps1`):\n\n```powershell\nSet-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward\nSet-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward\n```\n\n## Have syntax highlighting\n\nSee color highlighting in [./Microsoft.PowerShell_profile.ps1](./Microsoft.PowerShell_profile.ps1)\n"
  },
  {
    "path": "Windows/README.md",
    "content": "# Windows\n\n*Table of contents*\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Installation](#installation)\n  - [Install the latest Windows release with all the latest updates included](#install-the-latest-windows-release-with-all-the-latest-updates-included)\n  - [Install Windows without 3rd party bloatware](#install-windows-without-3rd-party-bloatware)\n  - [Things to do right after a Windows 11 installation](#things-to-do-right-after-a-windows-11-installation)\n- [Windows Update](#windows-update)\n  - [Run Windows Update from terminal](#run-windows-update-from-terminal)\n  - [Get the Windows Update log](#get-the-windows-update-log)\n- [Miscellaneous how-tos](#miscellaneous-how-tos)\n- [Favorite shortcuts](#favorite-shortcuts)\n- [Know the version and build](#know-the-version-and-build)\n- [Know the domain](#know-the-domain)\n- [Know whether a service is running on a port number](#know-whether-a-service-is-running-on-a-port-number)\n- [Change the screenshots default save location](#change-the-screenshots-default-save-location)\n- [Create your own custom keyboard layout](#create-your-own-custom-keyboard-layout)\n- [Wipe all the deleted data / free space on a drive](#wipe-all-the-deleted-data--free-space-on-a-drive)\n- [See the command history across all PowerShell sessions](#see-the-command-history-across-all-powershell-sessions)\n- [BitLocker](#bitlocker)\n  - [Lock a BitLocker encrypted drive from the command line](#lock-a-bitlocker-encrypted-drive-from-the-command-line)\n  - [Find out if your drive is running BitLocker software based encryption](#find-out-if-your-drive-is-running-bitlocker-software-based-encryption)\n  - [Disable BitLocker encryption for a drive](#disable-bitlocker-encryption-for-a-drive)\n- [Find a file or directory being used by another process](#find-a-file-or-directory-being-used-by-another-process)\n- [Autostarting programs locations](#autostarting-programs-locations)\n- [Get rid of US language in Windows 11](#get-rid-of-us-language-in-windows-11)\n- [Automation and bloatware removal](#automation-and-bloatware-removal)\n  - [Customize File Explorer (permanently disable files grouping)](#customize-file-explorer-permanently-disable-files-grouping)\n  - [Disable magnifier](#disable-magnifier)\n  - [Scripts for automation of routine tasks and bloatware removal](#scripts-for-automation-of-routine-tasks-and-bloatware-removal)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n\n## Installation\n\n1. Visit [Download Windows 11](https://www.microsoft.com/en-gb/software-download/windows11).\n1. **Create Windows 11 Installation Media** > Download now.\n1. Run the downloaded `MediaCreationToolW11.exe`.\n1. Follow the instructions to create a bootable USB drive.\n\n### Install the latest Windows release with all the latest updates included\n\n1. Download the image creation script from [UUP dump](https://uupdump.net/)\n\n1. Set `CustomList=1` in `ConvertConfig.ini` in order to avoid including Windows bloatware (like Outlook, Teams, Xbox, etc) in the installation image.\n\n1. Run `uup_download_windows.cmd`\n\nThe process will take a while: it takes 35 minutes on a beafy desktop computer with a 150 Mbps bandwidth. Once it's done, you'll find the ISO image (~6 GB) in the folder where you ran the script. You can use it to create a bootable USB drive with [Rufus](https://rufus.ie/).\n\n### Install Windows without 3rd party bloatware\n\n1. At the initial install, select \"_English (World)_\" as the _Time & Currency format_.\n\n1. After installation, open Windows Settings > _Time & Language & Region_ > _Country or region_: set the country you actually are located in.\n\n[Source](https://twitter.com/thiojoe/status/1686565269907636224).\n\n### Things to do right after a Windows 11 installation\n\n1. Run Windows Update and reboot until there are no more updates available\n1. Run [SetupConfig.ps1](./Scripts/SetupConfig.ps1) to apply various configuration tweaks using the following command:\n   ```powershell\n   powershell.exe -ExecutionPolicy Bypass -File .\\SetupConfig.ps1\n   ```\n1. Download [Incosolata Nerd Font](https://www.nerdfonts.com/font-downloads), extract and install all TTF files\n1. Set it as default font in Windows Terminal\n1. Install [PowerShell Toys](https://github.com/lackovic/PSToys) for a better PowerShell experience\n1. Run [SetupApps.ps1](./Scripts/SetupApps.ps1) to install commonly used applications via Winget\n1. Install your motherboard drivers (chipset, audio, LAN, etc.)\n1. Install your GPU drivers\n\n## Windows Update\n\n### Run Windows Update from terminal\n\n```powershell\nInstall-Module PSWindowsUpdate\nGet-WindowsUpdate\nInstall-WindowsUpdate\n```\n\n### Get the Windows Update log\n\nRunning the following command will create a `WindowsUpdate.log` file in your Desktop folder:\n\n```powershell\nGet-WindowsUpdateLog\n```\n\n## Miscellaneous how-tos\n\nSee [SetupConfig.ps1](./Scripts/SetupConfig.ps1).\n\n## Favorite shortcuts\n\n| Key                       | Command                                             |\n| ------------------------- | --------------------------------------------------- |\n| `Win+E`                   | Open File Explorer                                  |\n| `Win+X`                   | Open the Quick Link menu.                           |\n| `Win+R`                   | Open the Run dialog box.                            |\n| `Win+Tab`                 | Open Task view.                                     |\n| `Win+V`                   | Open the clipboard history.                         |\n| `Win+B`                   | Set focus to the first icon in the Taskbar corner.  |\n| `Win+number`              | Start/switch to the n-th app pinned to the taskbar. |\n| `Win+Ctrl+V`              | Open the sound output device selector               |\n\n[All shortcuts](https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec)\n\n## Know the version and build\n\nRun in PowerShell:\n```powershell\n# Displays the version in a window \nwinver\n\n# Displays the version in the terminal\nsysteminfo | findstr /B /C:\"OS Name\" /C:\"OS Version\"\n```\n\n## Know the domain\n\nRun in PowerShell either of the two:\n```powershell\nsysteminfo | findstr /B /C:\"Domain\"\nwmic computersystem get domain\n```\n\n## Know whether a service is running on a port number\n\nRun in PowerShell:\n```powershell\nnetstat -an -b | grep <port_number>\n```\n\n## Change the screenshots default save location\n\n1. Right click on `%USERPROFILE%\\Pictures\\Screenshots\\`\n\n1. Properties > Location\n\n## Create your own custom keyboard layout\n\n- [Microsoft Keyboard Layout Creator](https://www.microsoft.com/en-us/download/details.aspx?id=102134)\n\n## Wipe all the deleted data / free space on a drive\n\n```powershell\n# Overwrites the deallocated space on drive C:\ncipher /w:C\n```\n\nCipher goes through the following steps:\n\n1. creates the folder `C:\\EFSTMPWP`\n\n1. creates a first file in that folder filled with `0`, making it grow until the hard drive fills up\n\n1. deletes that file and creates a second one filled with `255`, making it grow until the hard drive fills up\n\n1. deletes the second file, creates a third file filled with random numbers, making it grow until the hard drive fills up again\n\n1. deletes the third file and returns you to the prompt\n\n## See the command history across all PowerShell sessions\n\n```powershell\ncat (Get-PSReadlineOption).HistorySavePath\n``` \n\n## BitLocker\n\n### Lock a BitLocker encrypted drive from the command line\n\n```powershell\nmanage-bde.exe -lock e:\n```\n\n### Find out if your drive is running BitLocker software based encryption\n\n```powershell\nmanage-bde -status\n```\n\n### Disable BitLocker encryption for a drive\n\n```powershell\nmanage-bde -off e:\n```\n\nThis will take a while, depending on the size of the drive and the amount of data stored on it. You can monitor the decryption progress with:\n\n```powershell\nmanage-bde -status\n```\n\nand then look at the _Conversion Status_ field and the _Percentage Encrypted_ field.\n\n## Find a file or directory being used by another process\n\n1. Open \"Resource Monitor\" (`resmon.exe`)\n1. Go to the \"CPU\" tab\n1. In the \"Associated Handles\" section, type part of the file or directory name in the search box\n\n## Autostarting programs locations\n\n- Task Manager > Startup apps\n\n- Registry Editor:\n\n   - `Computer\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run`\n\n   - `Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run`\n\n- Task Scheduler > Task Scheduler Library\n\n## Get rid of US language in Windows 11\n\nIn Windows 11 settings (`Win`+`i`), select _Time & language_ > _Language & region_:\n\n1. Open the Language options of any listed language, press _Add a keyboard_, select _US Qwerty_ to add it, then click on the triple dots next to _US Qwerty_ and select _Remove_ to remove it.\n\n1. _Related settings_ section, _Administrative language settings_ option, _Administrative_ tab, _Language for non-Unicode programs_ > press the _Change system locale..._ button, replace _US English_ with the layout of your main language.\n\n1. Reboot.\n\n[Source](https://superuser.com/questions/1680608/how-to-get-rid-of-us-language-in-windows-11/1749153)\n\n## Automation and bloatware removal\n\n### Customize File Explorer (permanently disable files grouping)\n\nUse [WinSetView](https://lesferch.github.io/WinSetView/) to apply the following changes:\n\nOptions:\n\n- Show file extensions\n- Classic context menu in Windows 11\n- No Internet in Windows search\n- Make All Folders Generic (Advanced interface)\n\nGlobal (details) columns:\n\n- Name\n- Size\n- Date created\n- Date modified\n- Type\n- Group by: (None)\n\n### Disable magnifier\n\n(The following steps are currently not working and are left here for reference until a working solution is found).\n\nIn an elevated PowerShell console run the following command:\n\n```powershell\ntakeown /f C:\\Windows\\System32\\Magnify.exe\n```\n- type Y and press Enter\n- Right-click on `C:\\Windows\\System32\\Magnify.exe` and rename it to `Magnify.exe.bak`\n\n### Scripts for automation of routine tasks and bloatware removal\n\n- [topics/windows-11-debloat](https://github.com/topics/windows-11-debloat)\n\n- [builtbybel/BloatyNosy](https://github.com/builtbybel/BloatyNosy)\n\n- [W4RH4WK/Debloat-Windows-10](https://github.com/W4RH4WK/Debloat-Windows-10)\n\n- [LeDragoX/Win-Debloat-Tools](https://github.com/LeDragoX/Win-Debloat-Tools)\n\n- [Tron fights for the User](https://www.reddit.com/r/TronScript/wiki/index)\n\n- [farag2/Windows-10-Sophia-Script](https://github.com/farag2/Windows-10-Sophia-Script)\n\n- [Disassembler0/Win10-Initial-Setup-Script](https://github.com/Disassembler0/Win10-Initial-Setup-Script) (discontinued since May 28, 2021)\n\n- [Sycnex/Windows10Debloater](https://github.com/Sycnex/Windows10Debloater) (discontinued since Sep 21, 2023)\n\n- [ChrisTitusTech/win10script](https://github.com/ChrisTitusTech/win10script) (discontinued since Sep 8, 2022)\n"
  },
  {
    "path": "Windows/Scripts/DeleteOldWinDirs.ps1",
    "content": "<#\n.SYNOPSIS\n    Removes old Windows directories from a previous Windows installation.\n.DESCRIPTION\n    Based on: https://superuser.com/a/1028115/54747\n.PARAMETER TargetDrive\n    The drive letter where the old Windows installation is located\n.PARAMETER Force\n    Skip confirmation prompts and proceed with deletion\n.EXAMPLE\n    .\\DeleteOldWinDirs.ps1 -TargetDrive \"D:\" -Force\n#>\n\n#Requires -RunAsAdministrator\n\nWrite-Host \"Warning: This script will permanently delete old Windows directories from the specified drive.`n         Ensure you have selected the correct drive and have backups if necessary.`n         Press c to continue or any other key to cancel.\" -ForegroundColor Red\n$key = [System.Console]::ReadKey($true)\nif ($key.Key -ne \"C\") {\n    Write-Host \"Operation cancelled by user.\" -ForegroundColor Yellow\n    exit\n}\nWrite-Host \"Continuing with deletion...\" -ForegroundColor Green\n\nparam(\n    [Parameter(Mandatory = $true)]\n    [ValidatePattern(\"^[A-Za-z]:$\")]\n    [string]$TargetDrive,\n    [switch]$Force\n)\n\n$ErrorActionPreference = \"Stop\"\n\nfunction Write-ColoredOutput {\n    param([string]$Message, [string]$Color = \"White\")\n    Write-Host $Message -ForegroundColor $Color\n}\n\nfunction Get-FolderSize {\n    param([string]$Path)\n    if (-not (Test-Path $Path)) { return 0 }\n    try {\n        $size = (Get-ChildItem $Path -Recurse -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum\n        return [math]::Round($size / 1GB, 2)\n    }\n    catch { return 0 }\n}\n\nfunction Remove-WindowsDirectory {\n    param([string]$Path, [string]$Name)\n    \n    if (-not (Test-Path $Path)) {\n        Write-ColoredOutput \"  $Name not found - skipping\" \"Yellow\"\n        return 0\n    }\n    \n    $size = Get-FolderSize $Path\n    Write-ColoredOutput \"  Removing $Name ($size GB)...\" \"Cyan\"\n    \n    try {\n        # Take ownership and set permissions\n        & takeown.exe /F $Path /A /R /D Y 2>&1 | Out-Null\n        & icacls.exe $Path /T /grant \"Administrators:F\" 2>&1 | Out-Null\n        \n        # Remove directory\n        Remove-Item $Path -Recurse -Force\n        Write-ColoredOutput \"  ✓ Removed $Name ($size GB)\" \"Green\"\n        return $size\n    }\n    catch {\n        Write-ColoredOutput \"  ✗ Failed to remove $Name`: $_\" \"Red\"\n        return 0\n    }\n}\n\n# Main execution\ntry {\n    Write-ColoredOutput \"`n=== Delete Old Windows Directories ===\" \"White\"\n    Write-ColoredOutput \"Target Drive: $TargetDrive\" \"Cyan\"\n    \n    # Check if running as administrator\n    if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {\n        throw \"This script requires Administrator privileges.\"\n    }\n    \n    # Check if target drive exists\n    if (-not (Test-Path $TargetDrive)) {\n        throw \"Target drive $TargetDrive does not exist.\"\n    }\n    \n    # Define directories to remove\n    $directories = @(\n        @{ Path = \"$TargetDrive\\Program Files\"; Name = \"Program Files\" }\n        @{ Path = \"$TargetDrive\\Program Files (x86)\"; Name = \"Program Files (x86)\" }\n        @{ Path = \"$TargetDrive\\ProgramData\"; Name = \"ProgramData\" }\n        @{ Path = \"$TargetDrive\\Users\"; Name = \"Users\" }\n        @{ Path = \"$TargetDrive\\Windows\"; Name = \"Windows\" }\n    )\n    \n    # Calculate total size\n    $totalSize = ($directories | ForEach-Object { Get-FolderSize $_.Path } | Measure-Object -Sum).Sum\n    Write-ColoredOutput \"Total size to delete: $totalSize GB`n\" \"Yellow\"\n    \n    # Show confirmation unless -Force is used\n    if (-not $Force) {\n        Write-ColoredOutput \"WARNING: This will permanently delete:\" \"Red\"\n        foreach ($dir in $directories) {\n            if (Test-Path $dir.Path) {\n                $size = Get-FolderSize $dir.Path\n                Write-ColoredOutput \"  - $($dir.Path) ($size GB)\" \"Yellow\"\n            }\n        }\n        \n        $response = Read-Host \"`nContinue? (yes/no)\"\n        if ($response -ne \"yes\") {\n            Write-ColoredOutput \"Operation cancelled.\" \"Yellow\"\n            exit 0\n        }\n    }\n    \n    # Remove directories\n    Write-ColoredOutput \"`nRemoving directories...\" \"White\"\n    $totalRemoved = 0\n    foreach ($dir in $directories) {\n        $totalRemoved += Remove-WindowsDirectory $dir.Path $dir.Name\n    }\n    \n    Write-ColoredOutput \"`n=== Completed Successfully ===\" \"Green\"\n    Write-ColoredOutput \"Total space freed: $totalRemoved GB\" \"Green\"\n}\ncatch {\n    Write-ColoredOutput \"`nError: $_\" \"Red\"\n    exit 1\n}\n"
  },
  {
    "path": "Windows/Scripts/DisableWake-on-LAN.ps1",
    "content": "# Get the specific Realtek adapter\n$nic = Get-NetAdapter | Where-Object { $_.InterfaceDescription -match \"Realtek\" }\n\nif ($nic) {\n    Write-Host \"Found: $($nic.InterfaceDescription)\" -ForegroundColor Cyan\n    \n    # Disable the standard Power Management features\n    # We use -ErrorAction SilentlyContinue because some drivers don't support all flags\n    Set-NetAdapterPowerManagement -InterfaceDescription $nic.InterfaceDescription `\n        -WakeOnMagicPacket Disabled `\n        -WakeOnPattern Disabled `\n        -ErrorAction SilentlyContinue\n\n    # Now we disable the \"Magic Packet\" and \"Pattern Match\" at the driver-specific level\n    # This is often where the 'Ghost' wakes live for Realtek cards\n    Write-Host \"Disabling hardware-level Advanced properties...\" -ForegroundColor Yellow\n    Set-NetAdapterAdvancedProperty -InterfaceDescription $nic.InterfaceDescription -DisplayName \"Wake on Magic Packet\" -DisplayValue \"Disabled\" -ErrorAction SilentlyContinue\n    Set-NetAdapterAdvancedProperty -InterfaceDescription $nic.InterfaceDescription -DisplayName \"Wake on pattern match\" -DisplayValue \"Disabled\" -ErrorAction SilentlyContinue\n    Set-NetAdapterAdvancedProperty -InterfaceDescription $nic.InterfaceDescription -DisplayName \"Shutdown Wake-On-Lan\" -DisplayValue \"Disabled\" -ErrorAction SilentlyContinue\n    \n    Write-Host \"Network wake features have been neutralized.\" -ForegroundColor Green\n} else {\n    Write-Warning \"Realtek adapter not found via PowerShell.\"\n}\n"
  },
  {
    "path": "Windows/Scripts/DisableWakeupTimers.ps1",
    "content": "# 1. Disable Wake Timers in the Active Power Plan using Aliases\n# This works even if the GUIDs are non-standard.\n$activeScheme = (powercfg /getactivescheme | ForEach-Object { $_.split(' ')[3] })\n\nWrite-Host \"--- Power Plan Security ---\" -ForegroundColor Cyan\ntry {\n    # 0 = Disabled, 1 = Enabled, 2 = Important Only\n    powercfg /setacvalueindex $activeScheme SUB_SLEEP RTCWAKE 0\n    powercfg /setdcvalueindex $activeScheme SUB_SLEEP RTCWAKE 0\n    powercfg /setactive $activeScheme\n    Write-Host \"[OK] Global Wake Timers disabled for active scheme: $activeScheme\" -ForegroundColor Green\n} catch {\n    Write-Warning \"Failed to set Power Plan via Aliases.\"\n}\n\n# 2. Neutralize 'WakeToRun' Scheduled Tasks\nWrite-Host \"`n--- Scanning Scheduled Tasks ---\" -ForegroundColor Cyan\nImport-Module ScheduledTasks\n$tasks = Get-ScheduledTask | Where-Object {$_.Settings.WakeToRun}\n\nif ($tasks) {\n    foreach ($task in $tasks) {\n        try {\n            $settings = $task.Settings\n            $settings.WakeToRun = $false\n            Set-ScheduledTask -TaskName $task.TaskName -TaskPath $task.TaskPath -Settings $settings -ErrorAction Stop\n            Write-Host \"[FIXED] Disabled wake trigger for: $($task.TaskName)\" -ForegroundColor Yellow\n        } catch {\n            Write-Warning \"[LOCKED] Could not modify $($task.TaskName) - Likely Protected by System.\"\n        }\n    }\n} else {\n    Write-Host \"[OK] No rogue wake-up tasks found.\" -ForegroundColor Green\n}\n\n# 3. Final Verification\nWrite-Host \"`n--- Current Wake Status ---\" -ForegroundColor Cyan\npowercfg /waketimers\n"
  },
  {
    "path": "Windows/Scripts/ReduceOneHour.js",
    "content": "// BulkRenameUtility script to reduce the hour of a date by one hour of filenames in the format \"YYYY-MM-DD HH.MM.SS\"\n// Example: 2021-01-01 23.59.59 -> 2021-01-01 22.59.59\n// Assumes that the hour is never 00\n\nfunction reduceOneHour(dateString) {\n    const parts = dateString.split(\"\\\\\");\n    const lastPart = parts.pop();\n    const hour = Number(lastPart.substring(11, 13));\n    var newHour = (hour - 1);\n    newHour = newHour < 10 ? \"0\" + newHour : \"\" + newHour;\n    const newLastPart = lastPart.substring(0, 11) + newHour + lastPart.substring(13);\n    return parts.length ? parts.join(\"\\\\\") + \"\\\\\" + newLastPart : newLastPart;\n}\n\nnewName = reduceOneHour(name);\n"
  },
  {
    "path": "Windows/Scripts/ReduceOneHour.ps1",
    "content": "<#\n.SYNOPSIS\n    Reduce the hour of date-based filenames by one hour.\n.NOTES\n    Processes files in the current directory with filenames in the format \"YYYY-MM-DD HH.MM.SS\".\n    Pattern matches the date/time portion but allows any file extension.\n.EXAMPLE\n    \"2024-01-01 23.59.59.txt\" -> \"2024-01-01 22.59.59.txt\"\n    \"2024-01-01 00.00.00.jpg\" -> \"2023-12-31 23.00.00.jpg\"\n    \"2024-03-01 00.30.15.mp4\" -> \"2024-02-29 23.30.15.mp4\"\n#>\n\n$pattern = \"^\\d{4}-\\d{2}-\\d{2} \\d{2}\\.\\d{2}\\.\\d{2}\"\n$files = Get-ChildItem | Where-Object { $_.BaseName -match $pattern }\n\nforeach ($file in $files) {\n    try {\n        # Extract the date components from the filename\n        $dateParts = $file.BaseName -split \" \"\n        if ($dateParts.Length -ne 2) {\n            Write-Warning \"Skipping '$($file.Name)': Invalid format\"\n            continue\n        }\n        \n        $date = $dateParts[0]\n        $time = $dateParts[1]\n        \n        # Validate date format\n        if ($date -notmatch '^\\d{4}-\\d{2}-\\d{2}$') {\n            Write-Warning \"Skipping '$($file.Name)': Invalid date format\"\n            continue\n        }\n        \n        # Validate time format\n        if ($time -notmatch '^\\d{2}\\.\\d{2}\\.\\d{2}$') {\n            Write-Warning \"Skipping '$($file.Name)': Invalid time format\"\n            continue\n        }\n        \n        # Convert the date string to DateTime object\n        $dateTime = [DateTime]::ParseExact(\"$date $($time.Replace('.', ':'))\", \"yyyy-MM-dd HH:mm:ss\", $null)\n        \n        # Subtract one hour\n        $newDateTime = $dateTime.AddHours(-1)\n        \n        # Format the new date and time\n        $newDate = $newDateTime.ToString(\"yyyy-MM-dd\")\n        $newTime = $newDateTime.ToString(\"HH.mm.ss\")\n        \n        # Construct new filename with original extension\n        $newName = \"$newDate $newTime$($file.Extension)\"\n        \n        # Check if target file already exists\n        if (Test-Path $newName) {\n            Write-Warning \"Cannot rename '$($file.Name)': Target file '$newName' already exists\"\n            continue\n        }\n        \n        # Rename the file\n        Rename-Item -Path $file.FullName -NewName $newName -ErrorAction Stop\n        \n        # Output the change\n        Write-Host \"Renamed: $($file.Name) -> $newName\"\n    }\n    catch {\n        Write-Error \"Error processing '$($file.Name)': $_\"\n    }\n}\n\n# Output summary of any files in the directory that weren't processed\n$unprocessedFiles = Get-ChildItem | Where-Object { $_.BaseName -notmatch $pattern }\nif ($unprocessedFiles) {\n    Write-Host \"`nFiles not matching the required format:\"\n    $unprocessedFiles | ForEach-Object { Write-Host \" - $($_.Name)\" }\n}\n"
  },
  {
    "path": "Windows/Scripts/SetupApps.ps1",
    "content": "<#\n.SYNOPSIS\n    Install commonly used applications via Winget.\n.NOTES\n    Comment out any applications you do not wish to install.\n#>\n\n#Requires -RunAsAdministrator\n\n# Verify Winget is installed\nif (-not (Get-Command winget -ErrorAction SilentlyContinue)) {\n    Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile winget.msixbundle\n    Add-AppxPackage winget.msixbundle\n    Remove-Item winget.msixbundle\n}\n\nwinget source update\n\n# General Apps\nwinget install -h --id Microsoft.WindowsTerminal\nwinget install -h --id Google.Chrome\nwinget install -h --id Telegram.TelegramDesktop\n\n# Needs to be installed from a non-elevated PowerShell\nwinget install -h --id Mega.MEGASync --ignore-security-hash\n\nwinget install -h --id DominikReichl.KeePass\nwinget install -h --id AutoHotkey.AutoHotkey\nwinget install -h --id Microsoft.PowerShell\nwinget install -h --id HermannSchinagl.LinkShellExtension\nwinget install -h --id Microsoft.VisualStudioCode\nwinget install -h --id Git.Git\nwinget install -h --id FastStone.Viewer\nwinget install -h --id LocalSend.LocalSend\nwinget install -h --id TGRMNSoftware.BulkRenameUtility\nwinget install -h --id SumatraPDF.SumatraPDF\nwinget install -h --id Spotify.Spotify\nwinget install -h --id GIMP.GIMP.3\nwinget install -h --id RIA.eIDsoftware\nwinget install -h --id CodecGuide.K-LiteCodecPack.Mega\nwinget install -h --id Avidemux.Avidemux\nwinget install -h --id JAMSoftware.TreeSize.Frees\n\nwinget install -h --id Microsoft.VCRedist.2015+.x64\nwinget install -h --id Deskflow.Deskflow\n\n# Gaming Apps\nwinget install -h --id Discord.Discord\nwinget install -h --id Valve.Steam\nwinget install -h --id Amazon.Games\nwinget install -h --id GOG.Galaxy\nwinget install -h --id EpicGames.EpicGamesLauncher\n\n# Work Apps\nwinget install -h --id JetBrains.IntelliJIDEA.Ultimate\nwinget install -h --id SlackTechnologies.Slack\nwinget install -h --id DBeaver.DBeaver.Community\nwinget install -h --id Docker.DockerDesktop\nwinget install -h --id Schniz.fnm\nwinget install -h --id Bruno.Bruno\nwinget install -h --id Gravitational.Teleport\nwinget install -h --id Google.GoogleDrive\n\n# Windows Subsystem for Linux\nwsl --install\n"
  },
  {
    "path": "Windows/Scripts/SetupConfig.ps1",
    "content": "<#\n.SYNOPSIS\n    Configure various Windows settings for improved usability and performance.\n.EXAMPLE\n    WARNING! This script must be executed in this specific way to avoid execution policy errors:\n    powershell.exe -ExecutionPolicy Bypass -File .\\SetupConfig.ps1\n\n.NOTES\n    Comment out any settings you do not wish to apply.\n#>\n\n#Requires -RunAsAdministrator\n\n# >>> Taskbar >>>\n\n# Disable Taskbar Search box\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search\" -Name \"SearchboxTaskbarMode\" -Type DWord -Value 0\n\n# Disable Taskbar Task View button\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"ShowTaskViewButton\" -Type DWord -Value 0\n\n# Disable Taskbar Widgets (News and Interests)\nWrite-Host \"*** Warning *** Disabling Taskbar Widgets (News and Interests) is not automated yet, please do it manually.\" -ForegroundColor Yellow\n\n# Disable Taskbar Chat button\nWrite-Host \"*** Warning *** Disabling Taskbar Chat button is not automated yet, please do it manually.\" -ForegroundColor Yellow\n\n# Set Taskbar alignment to Left (0 = Left, 1 = Center)\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"TaskbarAl\" -Type DWord -Value 0\n\n# >>> Explorer >>>\n\n# Hide desktop icons\nSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name HideIcons -Value 1\n\n# Enable showing hidden files and file extensions in Windows Explorer\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"HideFileExt\" -Value 0\n\n# Enable classic context menu\nreg add \"HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32\" /f /ve\n\n# Enable \"Expand to open folder\" in Navigation pane\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"NavPaneExpandToCurrentFolder\" -Value 1 -Type DWord\n\n# >>> Notification >>>\n\n# Disable Notifications\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications\" -Name \"ToastEnabled\" -Type DWord -Value 0 -Force\n\n# Enable Notifications > Do not disturb\nWrite-Host \"*** Warning *** Enabling Notifications > Do not disturb is not automated yet, please do it manually.\" -ForegroundColor Yellow\n\n# Disable Notifications > Additional settings > \"Show the Windows welcome experience...\"\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\" -Name \"SubscribedContent-310093Enabled\" -Value 0 -Type DWord\n\n# Disable Notifications > Additional settings > \"Suggest ways to get the most out of Windows...\"\nNew-Item -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement\" -Force | Out-Null\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement\" -Name \"ScoobeSystemSettingEnabled\" -Type DWord -Value 0\n\n# Disable Notifications > Additional settings > \"Get tips and suggestions when I use Windows\"\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\" -Name \"SubscribedContent-338389Enabled\" -Value 0 -Type DWord\n\n# >>> Power >>>\n\n# Set lid close action to \"Do Nothing\" for both battery and plugged in\npowercfg /setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0\npowercfg /setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0\npowercfg /setactive SCHEME_CURRENT\n\n# Enable hibernate option in power menu\npowercfg /hibernate on\nSet-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power' -Name HibernateEnabled -Value 1\nSet-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings' -Name ShowHibernateOption -Value 1 -Force\n\n# Control panel > Power options > Choose what the power buttons do > Turn on fast startup\nSet-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power\" -Name \"HiberbootEnabled\" -Value 1 -Type DWord\n\n# Disable computer wake up on key press or mouse movement\n# You might have to run this command again after a plugging in a new mouse or keyboard, or after a major Windows update\npowercfg /DEVICEQUERY wake_programmable | Select-String -Pattern \"mouse|keyboard\" | ForEach-Object { $_.ToString() } | ForEach-Object { powercfg /DEVICEDISABLEWAKE $_ }\n\n# >>> Visual and audio >>>\n\n# Set Sounds > More sounds settings > Sounds > Sound Scheme to \"No Sounds\"\nSet-ItemProperty -Path \"HKCU:\\AppEvents\\Schemes\" -Name \"(Default)\" -Value \".None\" -Type String\nGet-ChildItem -Path \"HKCU:\\AppEvents\\Schemes\\Apps\" -Recurse | \nWhere-Object { $_.PSChildName -eq \".Current\" } | \nForEach-Object { Set-ItemProperty -Path $_.PSPath -Name \"(Default)\" -Value \"\" -Type String }\n\n# Disable Accessibility > Visual effects > Transparency effects\nSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize' -Name EnableTransparency -Type DWord -Value 0\n\n# Disable Accessibility > Visual effects > Animation effects\n# https://github.com/Raphire/Win11Debloat/issues/120\nWrite-Host \"*** Warning *** Disabling Accessibility > Visual effects > Animation effects is not automated yet, please do it manually.\" -ForegroundColor Yellow\n\n# >>> Other Settings >>>\n\n# Disable Personalization > Start \"Show recommended files in Start, recent files in File Explorer, and items in Jump Lists\"\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"Start_TrackDocs\" -Value 0 -Type DWord\n\n# Disable Personalization > Start \"Show recommendetions for tips, shortcuts, new apps, and more\"\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"Start_IrisRecommendations\" -Value 0 -Type DWord\n\n# Disable file search integration in Start Menu\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name \"Start_SearchFiles\" -Value 0 -Type DWord\n\n# Enable Windows Update \"Get the latest updates as soon as they're available\"\nSet-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\WindowsUpdate\\UX\\Settings\" -Name \"IsContinuousInnovationOptedIn\" -Value 1 -Type DWord\n\n# Enable System > Clipboard > Clipboard history\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Clipboard\" -Name \"EnableClipboardHistory\" -Value 1 -Type DWORD -Force\n\n# Disable Cortana and web search integration in Windows Search\nreg add \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Search\" /v BingSearchEnabled /t REG_DWORD /d 00000000 /f\nreg add \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Search\" /v AllowSearchToUseLocation /t REG_DWORD /d 00000000 /f\nreg add \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Search\" /v CortanaConsent /t REG_DWORD /d 00000000 /f\n\n# Disable hyper key (Win+Alt+Ctrl+Shift) opening Microsoft Office\nREG ADD HKCU\\Software\\Classes\\ms-officeapp\\Shell\\Open\\Command /t REG_SZ /d rundll32 /f\n\n# Enable Windows Security > App & browser control > Reputation-based protection\nSet-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\AppHost\" -Name \"EnableWebContentEvaluation\" -Type DWord -Value 1\n\n# Restart Explorer to apply Start Menu changes\nStop-Process -Name explorer -Force\n"
  },
  {
    "path": "Windows/Scripts/UninstallBloatware.ps1",
    "content": "<#\n.SYNOPSIS\n    Uninstall common bloatware applications from Windows.\n.EXAMPLE\n    WARNING! This script must be executed in this specific way to avoid execution policy errors:\n    powershell.exe -ExecutionPolicy Bypass -File .\\UninstallBloatware.ps1\n\n.NOTES\n    Comment out any applications you do not wish to remove.\n#>\n\n#Requires -RunAsAdministrator\n\n# >>> Bloatware Removal >>>\n\n$apps = @(\n    \"*Clipchamp.Clipchamp*\",\n    \"*LinkedIn*\",\n    \"*Microsoft.BingNews*\",\n    \"*Microsoft.BingWeather*\",\n    \"*Microsoft.GamingApp*\",\n    \"*Microsoft.Microsoft3DViewer*\",\n    \"*Microsoft.MicrosoftSolitaireCollection*\",\n    \"*Microsoft.MicrosoftStickyNotes*\",\n    \"*Microsoft.MicrosoftOfficeHub*\",\n    \"*Microsoft.MixedReality.Portal*\",\n    \"*Microsoft.Office.OneNote*\",\n    \"*Microsoft.OutlookForWindows*\",\n    \"*Microsoft.Paint*\",\n    \"*Microsoft.Teams*\",\n    \"*Microsoft.Todos*\",\n    \"*Microsoft.Whiteboard*\",\n    \"*Microsoft.Windows.Photos*\",\n    \"*microsoft.windowscommunicationsapps*\", # Mail & Calendar\n    \"*Microsoft.Xbox*\",\n    \"*Microsoft.YourPhone*\",\n    \"*Microsoft.ZuneMusic*\", # Media Player\n    \"*Microsoft.ZuneVideo*\", # Movies & TV\n    \"*MicrosoftTeams*\",\n    \"*MSPaint*\",\n    \"*MSTeams*\",\n    \"*SkypeApp*\"\n)\n\nforeach ($app in $apps) {\n    Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -ErrorAction SilentlyContinue\n    # Remove provisioned packages to prevent reinstallation for new users\n    Get-ProvisionedAppxPackage -Online | Where-Object { $_.PackageName -like $app } | ForEach-Object { Remove-ProvisionedAppxPackage -Online -AllUsers -PackageName $_.PackageName }\n}\n\n# Microsoft Copilot\nwinget uninstall -h --id 9WZDNCRD29V9\n\n# OneDrive\nwinget uninstall -h --id Microsoft.OneDrive\n\n# Microsoft Teams Machine-Wide Installer\n$uninstallKeys = @(\"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\", \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\")\nforeach ($key in $uninstallKeys) {\n    Get-ChildItem $key -ErrorAction SilentlyContinue | Get-ItemProperty | Where-Object { $_.DisplayName -eq \"Teams Machine-Wide Installer\" } | ForEach-Object {\n        Start-Process msiexec.exe -ArgumentList \"/x $($_.PSChildName) /qn\" -Wait\n    }\n}\n\n# Microsoft Office 365 Suite\nwinget uninstall -h --id Microsoft.Office.365\nwinget uninstall -h --id Microsoft.Office.Desktop\n\n# Force remove Office/Outlook (MSI & Click-To-Run Registry lookup)\nWrite-Host \"Forcing removal of remaining Office/Outlook installations, the operation may take several minutes...\"\n$officeKeys = @(\"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\", \"HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\")\nforeach ($key in $officeKeys) {\n    Get-ChildItem $key -ErrorAction SilentlyContinue | Get-ItemProperty | Where-Object { $_.DisplayName -match \"Microsoft Office|Microsoft 365|Outlook\" } | ForEach-Object {\n        if ($_.UninstallString -match \"msiexec\") {\n            Write-Host \"Removing MSI: $($_.DisplayName)\"\n            Start-Process msiexec.exe -ArgumentList \"/x $($_.PSChildName) /qn\" -Wait\n        } elseif ($_.UninstallString -match \"OfficeClickToRun.exe\") {\n            Write-Host \"Removing C2R: $($_.DisplayName)\"\n            # Extract arguments and force silent display level\n            if ($_.UninstallString -match 'scenario=.*') {\n                $args = $matches[0] + \" DisplayLevel=False\"\n                Start-Process \"C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeClickToRun.exe\" -ArgumentList $args -Wait\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Windows/Scripts/WhatsAppMoveAndRename.ps1",
    "content": "<#\n.SYNOPSIS\n    Move and rename WhatsApp media files into organized folders by date.\n.DESCRIPTION\n    Processes WhatsApp media files in the current directory, moving and renaming them into a structured folder hierarchy based on the date embedded in the filenames.\n.EXAMPLE\n    IMG-20150527-WA0002.jpg -> .\\2015\\05\\2015-05-27 WA0002.jpg\n    VID-20130509-WA0006.mp4 -> .\\2013\\05\\2013-05-09 WA0006.mp4\n#>\n\nfunction Test-IsWhatsAppImage($file) {\n    return $file.BaseName.StartsWith(\"IMG-\") -and $file.Extension.equals(\".jpg\")\n}\n\nfunction Test-IsWhatsAppVideo($file) {\n    return $file.BaseName.StartsWith(\"VID-\") -and ($file.Extension.equals(\".mp4\") -or $file.Extension.equals(\".mov\") -or $file.Extension.equals(\".3gp\"))\n}\n\nfunction Test-IsWhatsAppMediaFile($file) {\n    return $file.BaseName.length.equals(19) -and $file.BaseName.substring(12, 3).equals(\"-WA\") -and ((Test-IsWhatsAppImage($file)) -or (Test-IsWhatsAppVideo($file)))\n}\n\nGet-ChildItem | ForEach-Object {\n    if (Test-IsWhatsAppMediaFile($_)) {\n        $BaseName = $_.BaseName\n        $Extension = $_.Extension\n        $Year = $BaseName.substring(4, 4)\n        $Month = $BaseName.substring(8, 2)\n        $Day = $BaseName.substring(10, 2)\n        $WhatsAppId = $BaseName.substring(13, 6)\n        $NewName = \"$Year-$Month-$Day $WhatsAppId$Extension\"\n        $Directory = \".\\$Year\\$Month\"\n        if (!(Test-Path $Directory)) {\n            New-Item -Path $Directory -ItemType Directory -Force | Out-Null\n        }\n        Move-Item $_ -Force -Destination \".\\$Directory\\$NewName\"\n    }\n}\n"
  },
  {
    "path": "Windows/Windows Subsystem for Linux/README.md",
    "content": "# Windows Subsystem for Linux (WSL2)\n\nWSL2 compared to WSL1 brings increased file system performance, full system call compatibility, virtualization technology (based on Hyper-V), a lightweight utility VM on a real Linux kernel allowing Docker containers to run natively without emulation. The Linux filesystem in WSL2 uses EXT4 directly over a virtual pmem device, thus achieving very close to native Linux performance. In order to benefit from WSL2 performance boost you need to run your applications in WSL2's local filesystem (e.g. `/home/user/src/`) and not in the mounted NTFS filesystem (e.g. `/mnt/c/`).\n\n## Contents\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Basic Commands](#basic-commands)\n- [Docker](#docker)\n    - [How to Import a Docker Image as a WSL Distribution](#how-to-import-a-docker-image-as-a-wsl-distribution)\n- [Run Linux GUI applications](#run-linux-gui-applications)\n  - [Setup XLaunch (legacy)](#setup-xlaunch-legacy)\n- [Install IntelliJ IDEA](#install-intellij-idea)\n  - [Windows 11](#windows-11)\n  - [Windows 10](#windows-10)\n  - [On ArchWSL](#on-archwsl)\n- [Backup - export/import distributions](#backup---exportimport-distributions)\n- [Manage multiple distributions](#manage-multiple-distributions)\n- [Use your Windows browser from WSL](#use-your-windows-browser-from-wsl)\n- [Useful links](#useful-links)\n- [Troubleshooting](#troubleshooting)\n  - [Time not synced](#time-not-synced)\n  - [WSL2 requires an update to its kernel component](#wsl2-requires-an-update-to-its-kernel-component)\n  - [Docker asking for a password](#docker-asking-for-a-password)\n  - [The computer gets stuck at booting](#the-computer-gets-stuck-at-booting)\n  - [WSL2 with NTFS is slow](#wsl2-with-ntfs-is-slow)\n- [Known issues](#known-issues)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n1. Run:\n\n   ```powershell\n   wsl --install\n   ```\n\n1. Reboot\n\n1. Run:\n\n   ```powershell\n   # Get the list of available Linux distributions\n   wsl.exe --list --online\n\n   # Install your favorite Linux distribution, e.g. Ubuntu 24.04\n   wsl.exe --install Ubuntu-24.04\n   ```\n\n1. In **Turn Windows features on or off** ensure that the following are:\n\n   - enabled: Virtual Machine Platform, Windows Subsystem for Linux\n\n   - disabled: Hyper-V, Windows Hypervisor Platform\n\n## Configuration\n\n1. if Linux has been installed with only the `root` user then in WSL run:\n\n   ```sh\n   sudo adduser <username> \n   ```\n\n1. set an empty password for your WSL user with the following command:\n\n   ```sh\n   sudo passwd -d <username>\n   ```\n   (secure access to your WSL shell is already protected by your Windows password)\n\n1. install all the updates:\n\n   ```sh\n   sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; sudo snap refresh\n   ```\n\n1. set your favorite editor as default editor:\n\n   ```sh\n   sudo update-alternatives --config editor\n   ```\n\n1. grant root privileges to your user:\n\n   ```sh\n   sudo visudo\n   ```\n\n   Append after `#User privilege specification`, right below `root`:\n\n   ```sh\n   <username> ALL=(ALL:ALL)ALL\n   ```\n\n1. if Linux was installed with only the `root` user then in PowerShell run:\n\n   ```powershell\n   ubuntu2204.exe config --default-user <username>\n   ```\n   (secure access to your WSL shell is already protected by your Windows password)\n\n## Basic Commands\n\nIn PowerShell:\n\n```powershell\n# Switch WSL version\nwsl --set-version <distro> <version>\n\n# List your distributions and their WSL versions\nwsl --list -v\n\n# Update WSL to its latest version (https://github.com/microsoft/WSL/releases)\nwsl --update\n```\n\n## Docker\n\n- [Docker Desktop WSL 2 backend](https://docs.docker.com/docker-for-windows/wsl/)\n\n- [Using Remote Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl)\n\n#### How to Import a Docker Image as a WSL Distribution\n\nThis guide shows how to replicate a Docker image as a WSL distribution. [amazoncorretto:21.0.8-al2023](https://hub.docker.com/layers/library/amazoncorretto/21.0.8-al2023/images/sha256-f3187c24c8a9e06d6cb49e378b397af4ff68e095588573e71aded97db0337249) is used as an example.\n\nStep 1: Pull the Docker Image\n```powershell\ndocker pull amazoncorretto:21.0.8-al2023\n```\n\nStep 2: Verify Image Download\n```powershell\ndocker images | findstr amazoncorretto\n```\nYou should see the image with size around 730MB.\n\nStep 3: Create Container from Image\n```powershell\ndocker create --name temp-corretto amazoncorretto:21.0.8-al2023\n```\n\nStep 4: Export Container to Tar File\n```powershell\ndocker export temp-corretto -o corretto-al2023.tar\n```\nThis will take several minutes and create a ~940MB tar file.\n\nStep 5: Verify Tar File Creation\n```powershell\ndir .\\corretto-al2023.tar\n```\nCheck that the file size is around 900MB+.\n\nStep 6: Create WSL Directory\n```powershell\nmkdir \"$env:USERPROFILE\\WSL\\CorrettoAL2023\"\n```\n\nStep 7: Import to WSL\n```powershell\nwsl --import CorrettoAL2023 \"$env:USERPROFILE\\WSL\\CorrettoAL2023\" \".\\corretto-al2023.tar\"\n```\n\nStep 8: Verify WSL Distribution\n```powershell\nwsl -l -v\n```\nYou should see `CorrettoAL2023` in the list.\n\nStep 9: Clean Up\n```powershell\ndocker rm temp-corretto\ndel .\\corretto-al2023.tar\n```\n\nStep 10: Launch Your New Environment\n```powershell\nwsl -d CorrettoAL2023\n```\n\nKey Notes:\n- **PowerShell Syntax:** Use `$env:USERPROFILE` in PowerShell, not `%USERPROFILE%`\n- **Export Method:** Always use `docker export -o filename.tar`, never `docker export > filename.tar`\n- **File Verification:** A proper tar file should show binary byte patterns, not UTF-16 encoding markers\n- **Naming:** You can replace `CorrettoAL2023` with any name you prefer for your WSL distribution\n\nYour new WSL distribution will have the exact same environment, packages, and Java version as the original Docker image.\n\n## Run Linux GUI applications\n\nThe newest versions of WSL2 have built-in support for GUI applications through the [WSLg](https://github.com/microsoft/wslg): it can run Linux GUI applications directly on Windows, without the need for a third-party X server. It comes enabled by default in Windows 11 and works out of the box. Linux GUI applications get automatically integrated into the Windows Start menu.\n\n### Setup XLaunch (legacy)\n\nThe following steps are kept for legacy purposes and for those who prefer to use XLaunch instead of WSLg.\n\nSetup:\n\n1. On Windows:\n\n   1. [Install _VcXsrv_ with winget](https://winget.run/pkg/marha/VcXsrv)\n\n   2. In the folder `%PROGRAMFILES%\\VcXsrv`:\n      \n      - right click on `vcxsrv.exe`\n      - Properties > Compatibility > Change high DPI settings\n      - Check _Override high DPI scaling behavior_\n      - Select _Application_\n\n   3. Control Panel\\System and Security\\Windows Defender Firewall\\Allowed apps\n\n      - Select _VcXsrv windows xserver_\n\n      - Check both Private and Public checkboxes\n\n      - Press _OK_ at the bottom of the window\n\n   4. Download [`config.xlaunch`](./config.xlaunch) to your file system (save it in `%AppData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup` if you want to make XLaunch automatically run at startup) and double click on it to run XLaunch\n\n      The _XLaunch_ configuration should be:\n\n         - Multiple Windows\n         - Display number = 0\n         - Start no client\n         - Disable access control\n\nWhen you want to run a GUI application in WSL2 you need to:\n\n1. On Windows: run _XLaunch_ with the shortcut created above\n\n1. On WSL: run the command to start your GUI application.\n\nSome applications may require a desktop environment (like _Xfce_, _Gnome_ or _KDE_) or a window manager (like _Blackbox_ or _Fluxbox_) to run properly.\n\nIf you are getting the error `xrdb: Can't open display` try other solutions on [this issue](https://github.com/QMonkey/wsl-tutorial/issues/11#issuecomment-650833026).\n\nSources: \n\n- [wsl2-tutorial](https://github.com/QMonkey/wsl-tutorial/blob/master/README.wsl2.md)\n- [What's the easiest way to run GUI apps on Windows Subsystem for Linux as of 2018?](https://askubuntu.com/questions/993225/whats-the-easiest-way-to-run-gui-apps-on-windows-subsystem-for-linux-as-of-2018)\n- [Developing \"in\" Windows Subsystem for Linux](https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004275400-Developing-in-Windows-Subsystem-for-Linux)\n\n## Install IntelliJ IDEA\n\n### Windows 11\n\n1. install the latest Java LTS version with [SDKMAN](https://sdkman.io/\n\n   ```sh\n   sdk install java\n   ``` \n\n1. Install IntelliJ IDEA with `sudo snap install intellij-idea-ultimate --classic`\n\n1. Run IntelliJ IDEA from the Windows Start menu or with `intellij-idea-ultimate`\n\n### Windows 10\n\nIn WSL:\n\n1. Download the [`tar.gz` file for Linux](https://www.jetbrains.com/idea/download/#section=linux) and extract it in your home directory `~`\n\n1. Run `~/intellij/bin/idea.sh`\n\n### On ArchWSL\n\nInstall [yay](../../Linux/README.md#install-aur-arch-user-repository-packages) and then run:\n\n```sh\nyay -S snapd genie-systemd\ngenie -s\nsudo systemctl enable --now snapd.socket\nsudo ln -s /var/lib/snapd/snap /snap\n# log out and back in again to ensure snap's paths are updated correctly\ngenie -s\nsudo snap install intellij-idea-ultimate --classic\n```\n\nRun with:\n\n```sh\ngenie -s\nintellij-idea-ultimate\n```\n\n## Backup - export/import distributions\n\nVery good for keeping a backup copy and recover it in case you mess up your distribution, but also for occasions like formatting the computer or moving to a new one! Once stripped off private credentials it can even passed over to a new colleague who has just joined your project to speed up the onboarding.\n\n```sh\n# List your distributions\nwsl --list -v\n\n# Save your distribution to a local file (this operation can take several minutes)\nwsl --export Ubuntu-20.04 ./Ubuntu-20.04.tar\n\n# Import a distribution from a local file\nmkdir ~/AppData/Local/Ubuntu-20.04\nwsl --import Ubuntu-20.04 ~/AppData/Local/Ubuntu-20.04 ./Ubuntu-20.04.tar --version 2\n```\n\n- [Source](https://www.hanselman.com/blog/easily-move-wsl-distributions-between-windows-10-machines-with-import-and-export)\n\n## Manage multiple distributions\n\nInstall [LxRunOffline](https://github.com/DDoSolitary/LxRunOffline) with:\n\n```powershell\nchoco install lxrunoffline\n```\n\nThis allows, among other things, to install, uninstall, move, duplicate a distribution.\n\nType `lxrunoffline` to see the list of supported actions.\n\n## Use your Windows browser from WSL\n\nRun:\n\n```sh\nsudo apt install wslu\n```\n\nThis solves the issue `/usr/bin/xdg-open: 882: www-browser: not found`. See https://github.com/microsoft/WSL/issues/8892\n\n## Useful links\n\n- [Microsoft WSL 2 Docs](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)\n\n- [Linux GUI applications in the Windows Subsystem for Linux (WSL) survey](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRzbKcfZyZQ9Drbxd4NOp_ZBUOFZVQ1A2UUlWRzBNMUtPOFFVVkRQWTNRQS4u)\n\n- [wsl2-hacks](https://github.com/shayne/wsl2-hacks)\n\n- [cpu benchmark of WSL2 vs Pop OS/Ubuntu 19.10](https://www.linkedin.com/pulse/cpu-benchmark-wsl2-vs-pop-osubuntu-1910-souradeep-chakrabarti/)\n\n- [WSL vs WSL 2 – performance](https://howto.lintel.in/wsl-vs-wsl-2-performance/)\n\n## Troubleshooting\n\n### Time not synced\n\nMaybe fixed by enabling systemd. See:\n\n- https://github.com/microsoft/WSL/issues/8204#issuecomment-1429164579\n\n- https://github.com/microsoft/WSL/issues/5324#issuecomment-1451150152\n\n- https://github.com/microsoft/WSL/issues/8204#issuecomment-1338334154\n\nManual solution: run `sudo hwclock -s` (syncs with world time) or `sudo ntpdate time.windows.com` (syncs with world time) after you reboot or resume from sleep/hibernate;\n\nAutomatic solution: append the following lines to your `~/.profile`.\n\n```sh\n# WSL specific (date issue)\nuname_out=$(uname -a)\nif echo $uname_out | grep -a \"Microsoft\"; then\n    sudo hwclock -s\nfi\n``` \n\nSee the following issues on GitHub:\n\n- Jun 2019: [Time not synced in WSL2 - causing TLS issues](https://github.com/microsoft/WSL/issues/4149) - closed\n\n- Jun 2019: [system date is not same with windows (WSL 2)](https://github.com/microsoft/WSL/issues/4245) - closed\n\n- Jun 2020: [WSL2 date incorrect after waking from sleep](https://github.com/microsoft/WSL/issues/5324) - open\n\n### WSL2 requires an update to its kernel component\n\n- download the [Linux kernel update package](https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel)\n\n- right click on the `wsl_update_x64.msi` file and select _Uninstall_\n\n- right click on the `wsl_update_x64.msi` file and select _Install_\n\n### Docker asking for a password\n\nFollow [these instructions](https://github.com/docker/for-win/issues/616#issuecomment-528390516) to fix it.\n\n### The computer gets stuck at booting\n\nDisable the secure boot in the BIOS\n\n### WSL2 with NTFS is slow\n\nIn order to benefit from WSL2 performance boost ([very close to native Linux performance](https://vxlabs.com/2019/12/06/wsl2-io-measurements/)), you need to copy and run your application in WSL2's local filesystem (EXT4 on a Hyper-V VHD) - e.g. `/home/`.\n\n## Known issues\n\nAs of Windows 10 version 2004 build 19041.1:\n\n- tunneling `127.0.0.1` [works only in the `Windows->WSL` direction](https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-insiders-preview-build-18945/), but not in the `WSL->Windows` one: subscribe to [this issue](https://github.com/microsoft/WSL/issues/4619) to know when access to windows services via `localhost:port` will be implemented in WSL2.\n"
  },
  {
    "path": "Windows/Windows Subsystem for Linux/config.xlaunch",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XLaunch WindowMode=\"MultiWindow\" ClientMode=\"NoClient\" LocalClient=\"False\" Display=\"0\" RemotePassword=\"\" PrivateKey=\"\" RemoteHost=\"\" RemoteUser=\"\" XDMCPHost=\"\" XDMCPBroadcast=\"False\" XDMCPIndirect=\"False\" Clipboard=\"True\" ClipboardPrimary=\"False\" ExtraParams=\"\" Wgl=\"False\" DisableAC=\"True\" XDMCPTerminate=\"False\"/>\n"
  },
  {
    "path": "Windows/Windows Terminal/README.md",
    "content": "\n# Windows Terminal\n\n[Windows Terminal](https://docs.microsoft.com/en-us/windows/terminal/) is a terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL, which provides multiple tab support as well as theming and customization.\n\n![Image description](https://raw.githubusercontent.com/lackovic/notes/master/Windows/Windows%20Terminal/img/windows-terminal-640.png)\n\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n_Table of Contents_\n\n- [Benefits](#benefits)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Run PowerShell Core as Administrator in a Windows Terminal tab](#run-powershell-core-as-administrator-in-a-windows-terminal-tab)\n- [File explorer integration](#file-explorer-integration)\n- [Enable Ctrl+F4 for closing the current tab/pane](#enable-ctrlf4-for-closing-the-current-tabpane)\n- [Useful shortcuts](#useful-shortcuts)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Benefits\n\n- You have all your environments a click or shortcut away, without having to type or remember anything: e.g. `ssh user@ip` or `wsl -d distribution_name`, etc;\n\n- the different theme/color setup makes you more aware of the environment where you are working on, thus reducing the risk of making unwanted operations in the wrong environment: e.g. with Ubuntu colors you are in an Ubuntu server, with a red background you are in production, etc;\n\n- being the configuration in one JSON file, you only need to set it up once and then you can reuse it with little modifications for all your machines.\n\n## Installation\n\n```powershell\n# latest stable\nchoco install microsoft-windows-terminal\n\n# pre-release (or Preview version)\nchoco install microsoft-windows-terminal --pre\n```\n\n## Configuration\n\nSee [`.\\settings.json`](settings.json) for examples on how to set:\n\n- [WSL profiles](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L58-L62)\n- [SSH profiles](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L50-L55)\n- [profile defaults](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L29-L30)\n- [custom icons](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L37) - you also need to put a 32x32 PNG in `%LOCALAPPDATA%\\packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\RoamingState`\n- [color schemes](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L89-L178)\n- [key bindings](https://github.com/lackovic/notes/blob/0d0bbf06c573ac2a976b071d39ebb0e62198e3e5/Windows/Windows%20Terminal/settings.json#L183-L205)\n\nPlace your icon files in `%LOCALAPPDATA%\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\RoamingState`.\n\nSome sample icons che be found in the [icons](./icons/) folder.\n\n## Run PowerShell Core as Administrator in a Windows Terminal tab\n\n```powershell\n# Install gsudo:\nchoco install gsudo -y\n\n# Update the current session with environment variables changes:\nrefreshenv\n\n# Generate a GUID:\n[guid]::NewGuid()\n\n# Add a new profile in Windows Terminal settings:\n{\n   \"guid\": \"{new-guid-generated-above}\",\n   \"hidden\": false,\n   \"name\": \"PowerShell Core Admin\",\n   \"commandline\": \"gsudo.exe pwsh\"\n}\n```\n\n- [Source](https://github.com/microsoft/terminal/issues/632#issuecomment-582782751)\n\n## File explorer integration\n\nYou can right click on a folder in File Explorer and select _Open in Windows Terminal_. See [Windows Terminal Preview 1.1 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-1-release/).\n\n## Enable Ctrl+F4 for closing the current tab/pane\n\nAdd the following to the `actions` array of your `settings.json`:\n\n```js\n{ \"command\": \"closePane\", \"keys\": \"ctrl+f4\" }\n```\n\n## Useful shortcuts\n\n- `Ctrl`+`Shift`+`n`, where `n` is a number: opens the n-th terminal type in a new tab (e.g. `1` for PowerShell, `2` for Ubuntu, etc).\n\n- `Ctrl`+`Shift`+`w`: closes the current tab.\n\n- `Ctrl`+`Shift`+`t`: opens a new tab with the same terminal type as the current tab.\n\n- `Alt`+`Shift`+`d`: splits the current pane horizontally or vertically (same terminal type).\n"
  },
  {
    "path": "Windows/Windows Terminal/settings.json",
    "content": "// This file was initially generated by Windows Terminal 0.11.1121.0\n// It should still be usable in newer versions, but newer versions might have additional\n// settings, help text, or changes that you will not see unless you clear this file\n// and let us generate a new one for you.\n\n// To view the default settings, hold \"alt\" while clicking on the \"Settings\" button.\n// For documentation on these settings, see: https://aka.ms/terminal-documentation\n{\n  \"$schema\": \"https://aka.ms/terminal-profiles-schema\",\n\n  \"defaultProfile\": \"{574e775e-4f2a-5b96-ac1e-a2962a402336}\",\n\n  // You can add more global application settings here.\n  // To learn more about global settings, visit https://aka.ms/terminal-global-settings\n\n  // If enabled, selections are automatically copied to your clipboard.\n  \"copyOnSelect\": false,\n\n  // If enabled, formatted data is also copied to your clipboard\n  \"copyFormatting\": false,\n\n  // A profile specifies a command to execute paired with information about how it should look and feel.\n  // Each one of them will appear in the 'New Tab' dropdown,\n  //   and can be invoked from the commandline with `wt.exe -p xxx`\n  // To learn more about profiles, visit https://aka.ms/terminal-profile-settings\n  \"profiles\": {\n    \"defaults\": {\n      // Put settings here that you want to apply to all profiles.\n      \"fontFace\": \"Inconsolata\",\n      \"startingDirectory\": \"c:\\\\src\"\n    },\n    \"list\": [\n      {\n        \"name\": \"PowerShell Core\",\n        \"source\": \"Windows.Terminal.PowershellCore\",\n        \"guid\": \"{574e775e-4f2a-5b96-ac1e-a2962a402336}\",\n        \"icon\": \"ms-appdata:///roaming/core6.png\",\n        \"colorScheme\": \"FrontEndDelight\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"PowerShell Core Admin\",\n        \"commandline\": \"gsudo.exe pwsh\",\n        \"guid\": \"{d6c12eb7-19b2-4e5a-bf70-f7f934fd79c8}\",\n        \"icon\": \"ms-appdata:///roaming/core6adm.png\",\n        \"colorScheme\": \"FrontEndDelightAdmin\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"SSH Remote Server\",\n        \"commandline\": \"ssh user@my.server.net\",\n        \"guid\": \"{5ae2482e-a074-4282-afc1-fc0d0fa1fc29}\",\n        \"icon\": \"ms-appdata:///roaming/ssh.png\",\n        \"colorScheme\": \"Novel\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"WSL Ubuntu-18.04\",\n        \"source\": \"Windows.Terminal.Wsl\",\n        \"guid\": \"{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}\",\n        \"icon\": \"ms-appdata:///roaming/ubuntu.png\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"PowerShell\",\n        \"commandline\": \"powershell.exe\",\n        \"guid\": \"{61c54bbd-c2c6-5271-96e7-009a87ff44bf}\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"Command Prompt\",\n        \"commandline\": \"cmd.exe\",\n        \"guid\": \"{0caa0dad-35be-5f56-a8ff-afceeeaa6101}\",\n        \"hidden\": false\n      },\n      {\n        \"name\": \"Azure Cloud Shell\",\n        \"source\": \"Windows.Terminal.Azure\",\n        \"guid\": \"{b453ae62-4e3d-5e58-b989-0a998ec441b8}\",\n        \"hidden\": true\n      }\n    ]\n  },\n\n  // Add custom color schemes to this array.\n  // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes\n  // https://github.com/mbadolato/iTerm2-Color-Schemes#screenshots\n  // https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/windowsterminal\n  \"schemes\": [\n    {\n      \"name\": \"FrontEndDelight\",\n\n      \"black\": \"#242526\",\n      \"red\": \"#f8511b\",\n      \"green\": \"#565747\",\n      \"yellow\": \"#fa771d\",\n      \"blue\": \"#2c70b7\",\n      \"purple\": \"#f02e4f\",\n      \"cyan\": \"#3ca1a6\",\n      \"white\": \"#adadad\",\n      \"brightBlack\": \"#5fac6d\",\n      \"brightRed\": \"#f74319\",\n      \"brightGreen\": \"#74ec4c\",\n      \"brightYellow\": \"#fdc325\",\n      \"brightBlue\": \"#3393ca\",\n      \"brightPurple\": \"#e75e4f\",\n      \"brightCyan\": \"#4fbce6\",\n      \"brightWhite\": \"#8c735b\",\n      \"background\": \"#1b1c1d\",\n      \"foreground\": \"#adadad\"\n    },\n    {\n      \"name\": \"FrontEndDelightAdmin\",\n\n      \"black\": \"#242526\",\n      \"red\": \"#f8511b\",\n      \"green\": \"#565747\",\n      \"yellow\": \"#fa771d\",\n      \"blue\": \"#2c70b7\",\n      \"purple\": \"#f02e4f\",\n      \"cyan\": \"#3ca1a6\",\n      \"white\": \"#adadad\",\n      \"brightBlack\": \"#5fac6d\",\n      \"brightRed\": \"#f74319\",\n      \"brightGreen\": \"#74ec4c\",\n      \"brightYellow\": \"#fdc325\",\n      \"brightBlue\": \"#3393ca\",\n      \"brightPurple\": \"#e75e4f\",\n      \"brightCyan\": \"#4fbce6\",\n      \"brightWhite\": \"#8c735b\",\n      \"background\": \"#221818\",\n      \"foreground\": \"#adadad\"\n    },\n    {\n      \"name\": \"Novel\",\n\n      \"black\": \"#000000\",\n      \"red\": \"#cc0000\",\n      \"green\": \"#009600\",\n      \"yellow\": \"#d06b00\",\n      \"blue\": \"#0000cc\",\n      \"purple\": \"#cc00cc\",\n      \"cyan\": \"#0087cc\",\n      \"white\": \"#cccccc\",\n      \"brightBlack\": \"#808080\",\n      \"brightRed\": \"#cc0000\",\n      \"brightGreen\": \"#009600\",\n      \"brightYellow\": \"#d06b00\",\n      \"brightBlue\": \"#0000cc\",\n      \"brightPurple\": \"#cc00cc\",\n      \"brightCyan\": \"#0087cc\",\n      \"brightWhite\": \"#ffffff\",\n      \"background\": \"#dfdbc3\",\n      \"foreground\": \"#3b2322\"\n    },\n    {\n      \"name\": \"Ubuntu\",\n\n      \"black\": \"#2e3436\",\n      \"red\": \"#cc0000\",\n      \"green\": \"#4e9a06\",\n      \"yellow\": \"#c4a000\",\n      \"blue\": \"#3465a4\",\n      \"purple\": \"#75507b\",\n      \"cyan\": \"#06989a\",\n      \"white\": \"#d3d7cf\",\n      \"brightBlack\": \"#555753\",\n      \"brightRed\": \"#ef2929\",\n      \"brightGreen\": \"#8ae234\",\n      \"brightYellow\": \"#fce94f\",\n      \"brightBlue\": \"#729fcf\",\n      \"brightPurple\": \"#ad7fa8\",\n      \"brightCyan\": \"#34e2e2\",\n      \"brightWhite\": \"#eeeeec\",\n      \"background\": \"#300a24\",\n      \"foreground\": \"#eeeeec\"\n    }\n  ],\n\n  // Add custom keybindings to this array.\n  // To unbind a key combination from your defaults.json, set the command to \"unbound\".\n  // To learn more about keybindings, visit https://aka.ms/terminal-keybindings\n  \"keybindings\": [\n    // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.\n    // These two lines additionally bind them to Ctrl+C and Ctrl+V.\n    // To learn more about selection, visit https://aka.ms/terminal-selection\n    { \"command\": { \"action\": \"copy\", \"singleLine\": false }, \"keys\": \"ctrl+c\" },\n    { \"command\": \"paste\", \"keys\": \"ctrl+v\" },\n\n    // Press Ctrl+Shift+F to open the search box\n    { \"command\": \"find\", \"keys\": \"ctrl+shift+f\" },\n\n    // Press Alt+Shift+D to open a new pane.\n    // - \"split\": \"auto\" makes this pane open in the direction that provides the most surface area.\n    // - \"splitMode\": \"duplicate\" makes the new pane use the focused pane's profile.\n    // To learn more about panes, visit https://aka.ms/terminal-panes\n    {\n      \"command\": {\n        \"action\": \"splitPane\",\n        \"split\": \"auto\",\n        \"splitMode\": \"duplicate\"\n      },\n      \"keys\": \"alt+shift+d\"\n    }\n  ]\n}\n"
  },
  {
    "path": "ffmpeg/README.md",
    "content": "# ffmpeg\n\n_Table of Contents_\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- generated with [DocToc](https://github.com/thlorenz/doctoc) -->\n\n- [Fix errors](#fix-errors)\n- [Fix non-standard stored B-frames](#fix-non-standard-stored-b-frames)\n- [Detect frozen parts](#detect-frozen-parts)\n- [Remove frozen parts](#remove-frozen-parts)\n- [Remove frozen parts without the audio](#remove-frozen-parts-without-the-audio)\n- [Concatenate video files](#concatenate-video-files)\n- [Extract the audio from a video](#extract-the-audio-from-a-video)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Fix errors\n\n```sh\nffmpeg -err_detect ignore_err -i INPUT.avi -c copy OUTPUT.avi\n```\n\n## Fix non-standard stored B-frames\n\n```sh\nffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi\n```\n\n## Detect frozen parts\n\n```sh\nffmpeg -i .\\INPUT.avi -vf \"freezedetect=n=-60dB:d=2\" -map 0:v:0 -f null -\n```\n\n## Remove frozen parts\n\n```sh\nffmpeg -i INPUT.mp4 -vf mpdecimate -vsync vfr OUTPUT.mp4\n```\n\n## Remove frozen parts without the audio\n\n```sh\nffmpeg -i INPUT.mkv -vf mpdecimate -map 0:v OUTPUT.mp4\n```\n\n## Concatenate video files\n\nUse this method when your videos have the same parameters (width, height, formats/codecs) to avoid a re-encode.\n\nFirst prepare a text file `mylist.txt` containing the list of files you want to concatenate, in the following format:\n\n```\nfile '/path/to/file1'\nfile '/path/to/file2'\nfile '/path/to/file3'\n``` \n\nThen run the following command:\n\n```sh\nffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4\n```\n\n- [Source](https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg)\n\n## Extract the audio from a video\n\n```sh\nffmpeg -i sample.mp4 -q:a 0 -map a sample.mp3\n```\n"
  },
  {
    "path": "graphviz/README.md",
    "content": "# graphviz\n\n[Graphviz](https://graphviz.org/) is open source graph visualization software: it takes the description of a graph in a simple text language and generates an image out of it. \n\nWrite your graph nodes and edges in a `diagram.dot` file and then run the following command to generate a PNG image out of it:\n\n```sh\ndot -Tpng diagram.dot > diagram.png\n```\n\nUse [WebGraphviz](http://www.webgraphviz.com/) to try graphviz in the browser.\n\n## Visual Studio Code Extension\n\n- [Graphviz (dot) language support for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz)\n"
  },
  {
    "path": "graphviz/diagram.dot",
    "content": "// https://www.graphviz.org/\n// dot -Tpng diagram.dot > diagram.png\n\ndigraph architecture {\n    graph [ compound=true, nodesep=1 ]\n    node [ color=lightblue2, style=\"filled,rounded\", shape=box ]\n\n    subgraph cluster0 {\n        label=\"Users\"\n        fontcolor=\"dimgray\"\n        color=silver\n        style=dotted\n        customer [ label=<<i>Customer</i>>, color=\"/gnbu3/1\" ]\n        customer_support_employee [ label=<<i>Customer support employee</i>>, color=\"/gnbu3/1\" ]\n        marketing_employee [ label=<<i>Marketing/sales employee</i>>, color=\"/gnbu3/1\" ]\n    }\n\n    customer -> mobile_app, desktop_app, web_app [ color=blue ]\n    customer_support_employee -> backoffice [ color=blue ]\n    marketing_employee -> crm, backoffice [ color=blue ]\n\n    subgraph cluster1 {\n        label=\"Frontends\"\n        fontcolor=\"dimgray\"\n        color=silver\n        style=dotted\n        mobile_app [ label=<<i>Mobile app</i>>, color=\"/gnbu3/2\" ]\n        web_app [ label=<<i>Web app</i>>, color=\"/gnbu3/2\" ]\n        \n        subgraph cluster5 {\n            label=\"\"\n            color=none\n            backoffice [ label=<<i>Backoffice</i>>, color=\"/gnbu3/2\" ]\n            desktop_app [ label=<<i>Desktop app</i>>, color=\"/gnbu3/2\" ]\n        }\n        \n        crm [ label=<<i>CRM</i>>, color=lightgreen, color=\"/gnbu3/3\" ]\n    }\n\n    mobile_app -> service1\n    web_app -> service2\n    backoffice -> service3, service4\n    desktop_app -> service3\n\n    subgraph cluster2 {\n        label = \"Backends\"\n        fontcolor=\"dimgray\"\n        color=silver\n        style=dotted\n        service1 [ label=\"service-1\", fontname = \"consolas\", color=\"/gnbu3/2\" ]\n        service2 [ label=\"service-2\", fontname = \"consolas\", color=\"/gnbu3/2\" ]\n        service3 [ label=\"service-3\", fontname = \"consolas\", color=\"/gnbu3/2\" ]\n        service4 [ label=\"service-4\", fontname = \"consolas\", color=\"/gnbu3/2\" ]\n\n        subgraph {\n            service5 [ label=\"service-5\", fontname = \"consolas\", color=\"/gnbu3/3\" ]\n            service6 [ label=\"service-6\", fontname = \"consolas\", color=\"/gnbu3/3\" ]\n            service7 [ label=\"service-7\", fontname = \"consolas\", color=\"/gnbu3/3\" ]\n        }\n        service6 -> service7 [ color=orange ]\n        service5 -> service7 [ color=orange ]\n        service7 -> crm\n    }\n\n    service1 -> service5, service3\n    service2 -> service5, service3\n    service3 -> service5, service6 [ color=red ]\n    service4 -> service5 [ color=red ]\n\n    subgraph cluster_legend {\n        node [ style=invis, width=0, height=0 ]\n        label=\"Legend\"\n        fontcolor=\"dimgray\"\n        color=silver\n        { rank=same; u1 -> u2 [ label=\"Use\", color=blue ] }\n        { rank=same; r1 -> r2 [ label=\"REST\", color=black ] }\n        { rank=same; a1 -> a2 [ label=\"ActiveMQ\", color=red ] }\n        { rank=same; l1 -> l2 [ label=\"Embedded library\", color=orange ] }\n        service7 -> u1 [ style=invis ]\n        service7 -> r1 [ style=invis ]\n        service7 -> a1 [ style=invis ]\n        service7 -> l1 [ style=invis ]\n    }\n\n}"
  }
]