Target for maximum number of vnodes
Maximum number of files
Current secure level
| # List all possible power config GUIDs in Windows | |
| # Run: this-script.ps1 | Out-File powercfg.ps1 | |
| # Then edit and run powercfg.ps1 | |
| # (c) Pekka "raspi" Järvinen 2017 | |
| $powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting | |
| $powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup | |
| Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingCapabilities | ForEach-Object { | |
| $tmp = $_.ManagedElement |
| # List Windows advanced power settings as MarkDown | |
| # Use: | |
| # this-script.ps1 | Out-File power.md | |
| # Use powercfg to show hidden settings: | |
| # powercfg -attributes <Group GUID> <GUID> -ATTRIB_HIDE | |
| # example: | |
| # powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35d -ATTRIB_HIDE | |
| # (c) Pekka "raspi" Järvinen 2017- | |
| $powerSettingSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingSubgroup | Where-Object {$_.ElementName -ne $null} |
| #!/bin/bash -e | |
| # Output JSON from ImageMagick magick identify command | |
| if [[ $# -eq 0 ]] ; then | |
| echo "Usage:" | |
| echo " $0 <filename>" | |
| echo "" | |
| exit 0 | |
| fi |
| # Download new packages but don't install them | |
| # Save in /etc/systemd/system/ | |
| [Unit] | |
| Description=Pacman Automatic Download (no install) service | |
| After=network-online.target | |
| [Service] | |
| # Wait time if process hangs | |
| TimeoutStopSec=5m |
| # systemctl --user enable murmur | |
| # systemctl --user start murmur | |
| # .config/systemd/user/murmur.service : | |
| [Unit] | |
| Description=Mumble Daemon | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/usr/bin/murmurd -ini murmur.ini -fg |
| #!/bin/bash | |
| # source_*.png (source_1234.png) to mkv | |
| find . -type f -iname "*.png" -printf "%f\n" | sort -n | xargs cat | ffmpeg -f image2pipe -i - output.mkv |
| pgrep -fi firefox | xargs -I{} find /proc/{}/fd -readable -type l -printf '%p%f: %l\n' |
| # Local chat with socat | |
| # Server runs: | |
| socat ABSTRACT-LISTEN:@chat,socktype=5,fork STDOUT | |
| # Client: | |
| socat ABSTRACT-CONNECT:@chat,socktype=5 - |
| from itertools import permutations | |
| from typing import Generator, List | |
| def gen(s: List[str]) -> Generator: | |
| for i in permutations(s, len(s)): | |
| yield list(i) | |
| def acro(a:List[str]) -> Generator: | |
| for i in gen(a): | |
| firsts:List[str] = [] |