- Go to Settings -> Dock -> "Hide Dock when not in use"
- Remove unused items from dock
- Make it more fun to use:
defaults write com.apple.dock orientation left
defaults write com.apple.Dock autohide-delay -float 0.05
| { | |
| "platform": "BroadlinkRM", | |
| "name": "BroadlinkRM", | |
| "_bridge": { | |
| "username": "0E:3B:EB:D1:97:87", | |
| "port": 46578 | |
| }, | |
| "hideWelcomeMessage": true, | |
| "accessories": [ | |
| { |
| # Mounting current directory to C:/tmp inside Server 2016 docker image | |
| docker run --mount src="$pwd",dst=C:/tmp/,type=bind -it mcr.microsoft.com/windows/servercore:ltsc2016 powershell |
| template <typename Func> | |
| auto decorator(Func func) { | |
| return [&]{ | |
| std::cout << "Calling f():\n"; | |
| func(); | |
| }; | |
| } | |
| auto foo(fs::path filepath) { | |
| auto func = [filepath] { | |
| std::cout << filepath << "\n"; |
| import sys | |
| import scapy.all as s | |
| pkt_bytes = [0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x48, 0x4d, 0x7e, 0xb9, 0x4d, 0x34, 0x08, 0x00, 0x45, 0x00, 0x00, 0x6a, | |
| 0xae, 0x07, 0x40, 0x00, 0xff, 0x11, 0x8e, 0x1a, 0x0a, 0xa6, 0x53, 0xbf, 0xe0, 0x00, 0x00, 0xfb, 0x14, 0xe9, | |
| 0x14, 0xe9, 0x00, 0x56, 0xf6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 0x05, 0xd7, 0x94, 0xd7, 0x99, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x01, 0xc0, 0x0c, 0x00, 0x0c, 0x00, 0x01, 0x00, | |
| 0x00, 0x11, 0x94, 0x00, 0x20, 0x1d, 0x48, 0x50, 0x20, 0x4c, 0x61, 0x73, 0x65, 0x72, 0x4a, 0x65, 0x74, 0x20, | |
| 0x4d, 0x46, 0x50, 0x20, 0x4d, 0x36, 0x33, 0x30, 0x20, 0x5b, 0x43, 0x41, 0x43, 0x39, 0x31] |
| # Require `Install-Module VSSetup -Scope CurrentUser` | |
| function vsdev | |
| { | |
| param( | |
| [int] $Version = 16 # VS 2019 | |
| ) | |
| $vspath = Get-VSSetupInstance | where { $_.InstallationVersion.Major -eq $Version } | select -first 1 -ExpandProperty InstallationPath | |
| Import-Module "$vspath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" && Enter-VsDevShell -VsInstallPath $vspath -SkipAutomaticLocation -DevCmdArguments '-arch=x64' | |
| } |
| #include <tuple> | |
| template <typename... Args> | |
| constexpr void ignore0(Args... args) | |
| { | |
| constexpr auto dummy = [](auto&& a) { std::ignore = a;}; | |
| (dummy(std::forward<Args>(args)), ...); | |
| } | |
| template <typename... Args> |
| #include <string> | |
| #include <iostream> | |
| #include <chrono> | |
| #include <thread> | |
| #include <format> // Requires C++20 | |
| using system_clock = std::chrono::system_clock; | |
| using namespace std::chrono_literals; | |
| const std::string& get_static_message() { |
| #include <string> | |
| #include <iostream> | |
| #include <string> | |
| template <typename T> | |
| constexpr auto NullTerminator() { | |
| return std::string(sizeof(typename T::value_type), '\0'); | |
| } | |
| int main() { |
| import logging | |
| import requests | |
| import sys | |
| from os import path | |
| # https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook | |
| TEAMS_WEBHOOK = "{YOUR_WEBHOOK_LINK}" | |
| LOG_FILE = path.join(path.dirname(__file__), "log.txt") | |
| logger = logging.getLogger(__name__) |