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 bash | |
auth="username:password" | |
host=imaps://imap.example.org | |
curl -u $auth $host -X 'LIST "" "*"' | |
curl -u $auth $host -X 'STATUS INBOX (MESSAGES)' |
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 bash | |
work_pwd=`secret-tool lookup user vodolaz095 domain example.org` | |
( | |
sleep 1 | |
echo "vodolaz095" | |
sleep 1 | |
echo "$work_pwd" | |
) | nmcli connection up work --ask |
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
package count_steps | |
/* | |
Необходимо определить userIds участников, которые прошли наибольшее количество шагов steps за все дни, не пропустив ни одного дня соревнований. | |
Пример | |
# Пример 1 | |
# ввод | |
statistics = [ |
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 bash | |
# This script makes local copy of all Valheim user's data | |
set -e | |
fname=`date "+%Y_%m_%d___%H_%M_%S"` | |
fpath="$HOME/Documents/backups/valheim/valheim_$fname.zip" | |
echo "Preparing to make backup into $fpath..." |
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
package strings | |
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"strings" | |
"testing" | |
) |
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 bash | |
# upgrade system | |
su -c 'dnf upgrade -y' | |
# install extra repos | |
su -c 'dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm' | |
su -c 'dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm' | |
su -c 'dnf upgrade -y rpmfusion-free-release rpmfusion-nonfree-release' |
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/bash | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 9 | head -n 1) | |
PIC_URL=$HOME/Pictures/Screenshots/$NEW_UUID.png | |
mkdir -p $HOME/Pictures/Screenshots | |
scrot -s -c $PIC_URL | |
scp $PIC_URL holod.local:/srv/www/s/ |
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
+ check_common_commands http://example.com | |
+ '[' 1 -gt 0 ']' | |
+ parm=http://example.com | |
+ shift | |
+ case "$parm" in | |
+ '[' 0 -gt 0 ']' | |
+ '[' -z '' ']' | |
+ unset XDG_UTILS_DEBUG_LEVEL | |
+ '[' 0 -lt 1 ']' | |
+ xdg_redirect_output=' > /dev/null 2> /dev/null' |
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
package main | |
import ( | |
"gopkg.in/telegram-bot-api.v4" | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { |
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/bash | |
DISPLAY=:0.0 /bin/notify-send "$1" |
NewerOlder