This file contains hidden or 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 -e | |
| # Personal development environment (PDE) in Linux | |
| # `mkdir /w; cd /w; ./setup-pde.sh` | |
| # Install: | |
| # git curl wget unzip | |
| mkdir -p ~/.config |
This file contains hidden or 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 python | |
| ssid = 'my-ssid' | |
| password = '1234567890' | |
| def print_qr(f, data): | |
| # Select the QR code model (2: model 2) | |
| f.write(b'\x1D\x28\x6B\x04\x00\x31\x41\x32\x00') |
This file contains hidden or 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
| # Setup personal development environment in Windows | |
| Function Test-CommandExists | |
| { | |
| Param ($command) | |
| $oldPreference = $ErrorActionPreference | |
| $ErrorActionPreference = 'stop' | |
| try {if(Get-Command $command){RETURN $true}} | |
| Catch {Write-Host "$command does not exist"; RETURN $false} | |
| Finally {$ErrorActionPreference=$oldPreference} |
This file contains hidden or 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 python | |
| # Підрахунок очок і обчислення місць учасників багатоетапних | |
| # змагань зі спортивного орієнтування. | |
| # Запуск: | |
| # - Експортувати результати етапів у файли e1-results-iof-3.0.xml,… | |
| # - Задати кількість етапів у змінній stage_count | |
| # - Запустити ./summary.py | |
| # Таблицю буде надруковано в текстовому вигляді у стандартний вивід stdout |
This file contains hidden or 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
| INSERT INTO main.stages (id) VALUES (2); | |
| INSERT INTO main.stages (id) VALUES (3); | |
| INSERT INTO main.stages (id) VALUES (4); | |
| INSERT INTO main.classdefs (classId, stageId) SELECT b.classId, 2 FROM main.classdefs b WHERE b.stageId = 1; | |
| INSERT INTO main.classdefs (classId, stageId) SELECT b.classId, 3 FROM main.classdefs b WHERE b.stageId = 1; | |
| INSERT INTO main.classdefs (classId, stageId) SELECT b.classId, 4 FROM main.classdefs b WHERE b.stageId = 1; | |
| INSERT INTO main.runs (competitorId, siId, stageId) SELECT b.competitorId, b.siId, 2 FROM main.runs b WHERE b.stageId = 1; | |
| INSERT INTO main.runs (competitorId, siId, stageId) SELECT b.competitorId, b.siId, 3 FROM main.runs b WHERE b.stageId = 1; |
This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <!-- | |
| Load schedding reminder | |
| from https://kyiv.yasno.com.ua/schedule-turn-off-electricity | |
| group 3 | |
| Anatolii Sakhnik <sakhnik@gmail.com> | |
| Kyiv, 2022 | |
| --> | |
| <html> |
This file contains hidden or 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
| 2020-05-24 08:09:29 - [sway/main.c:152] Linux chbox 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 x86_64 GNU/Linux | |
| 2020-05-24 08:09:29 - [sway/main.c:168] Contents of /etc/os-release: | |
| 2020-05-24 08:09:29 - [sway/main.c:152] NAME="Arch Linux" | |
| 2020-05-24 08:09:29 - [sway/main.c:152] PRETTY_NAME="Arch Linux" | |
| 2020-05-24 08:09:29 - [sway/main.c:152] ID=arch | |
| 2020-05-24 08:09:29 - [sway/main.c:152] BUILD_ID=rolling | |
| 2020-05-24 08:09:29 - [sway/main.c:152] ANSI_COLOR="38;2;23;147;209" | |
| 2020-05-24 08:09:29 - [sway/main.c:152] HOME_URL="https://www.archlinux.org/" | |
| 2020-05-24 08:09:29 - [sway/main.c:152] DOCUMENTATION_URL="https://wiki.archlinux.org/" | |
| 2020-05-24 08:09:29 - [sway/main.c:152] SUPPORT_URL="https://bbs.archlinux.org/" |
This file contains hidden or 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
| set $mod Mod4 | |
| exec /usr/bin/alacritty | |
| # Use Mouse+$mod to drag floating windows to their wanted position | |
| floating_modifier $mod | |
| # start a terminal | |
| bindsym $mod+Return exec i3-sensible-terminal |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Goto review | |
| // @namespace all | |
| // @version 1 | |
| // @grant none | |
| // @include https://jira.mycompany.com/browse/* | |
| // ==/UserScript== | |
| (function(){ | |
| 'use strict' |
This file contains hidden or 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
| // vim: set et ts=4 sw=4: | |
| // make: g++ -std=c++14 magic.cpp | |
| #include <iostream> | |
| #include <cassert> | |
| int main() | |
| { | |
| // First count 3-digit combinations yielding different results from 0 to 9+9+9 (28 total) | |
| int counts[28] = {}; |