Здесь не будет написано о причинах использовать OpenBSD. WiFi в БГУИР предоставляется бесплатно для студентов,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
set +o sh | |
case $(sysctl kern.video.record ) in | |
kern.video.record=0 ) | |
printf "%s\n" "Sysctl video record was not enabled" | |
sysctl kern.video.record=1 | |
;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
Url=$1 | |
Sleep_Arg=$2 | |
[ -z "$Sleep_Arg" ] && Sleep_Arg=60 | |
get_http_header_last_modified () { | |
curl "$1" --output /dev/null --silent --dump-header - \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#chmod 444 | |
# . ./ed_prompt.sh | |
alias ed='ed -p "# "' | |
export EDITOR="ed -p '~ '" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e # Errexit | |
set -u # Nounset | |
set -o pipefail | |
dump -0un -f - /home | gzip -9 | age -r \ | |
agekeyusedforfileencryption_https_age-encryption_org_v1 \ | |
> /mnt/backup/home_dump-0.gz.age |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################ | |
# https://docs.python.org/3/tutorial/datastructures.html | |
# https://docs.python.org/3/howto/sorting.html | |
# https://docs.python.org/3/library/stdtypes.html | |
def array_diff(a, b): | |
c = [] | |
for el in a: | |
if el not in b: | |
c.append(el) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
cmd_query = "setxkbmap -query | awk '/layout/{print $2}' "; | |
cmd_us = "setxkbmap us -variant colemak"; | |
cmd_ru = "setxkbmap ru -variant ruu"; | |
cmd_query | getline layout; | |
close(cmd_query); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# File uploader | |
FILENAME=$1 | |
transfer_holder=https://transfer.sh | |
transfer_upload () { | |
curl --upload-file "$1" "$transfer_holder"/"$1" | |
} | |
transfer_upload "$FILENAME" | xclip -selection clipboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 0BSD github.com/artsi0m | |
# filename could be .xinitrc or .xsessions | |
# Here goes stuff from xbase.tgz: | |
export LC_CTYPE="en_US.UTF-8" & | |
xcompmgr & | |
xrdb -merge .Xresources & | |
xclock -digital -geometry 184x40+652+24 & | |
xload -geometry 120x137+340+24 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*% cc -O0 -g % -o # | |
* com [-n] [file ...] | |
* looks for the sequence /*% in each file, and sends the rest of the | |
* line off to the shell, after replacing any instances of a `%' character | |
* with the filename, and any instances of `#' with the filename with its | |
* suffix removed. Used to allow information about how to compile a program | |
* to be stored with the program. The -n flag causes com not to | |
* act, but to print out the action it would have taken. | |
* | |
* This version of com would also create compile_flags.txt for clangd if |