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
| see explanation.md |
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
| <?php | |
| # Library https://github.com/mibe/FeedWriter was used | |
| # php 5.3 required! | |
| require_once 'FeedWriter_Lib//Item.php'; | |
| require_once 'FeedWriter_Lib//Feed.php'; | |
| require_once 'FeedWriter_Lib//RSS2.php'; | |
| require_once 'FeedWriter_Lib//InvalidOperationException.php'; |
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 | |
| set -x | |
| docker run --rm -p 5050:5050 -v /home/d9k/soft/pgadmin4/data_pgadmin:/pgadmin thajeztah/pgadmin4 |
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
| return function (...) | |
| local result = {} | |
| local args, args_count = {...}, select('#', ...) | |
| for i = 1, args_count do | |
| item = args[i] | |
| if item == nil then | |
| table.insert(result, '') | |
| else | |
| table.insert(result, item) | |
| end |
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
| // These colors are specific to the theme. Do not use in a package! | |
| @very-light-gray: #c5c8c6; | |
| @light-gray: #969896; | |
| @gray: #373b41; | |
| @dark-gray: #282a2e; | |
| @very-dark-gray: #1d1f21; | |
| @cyan: #8abeb7; | |
| @blue: #81a2be; |
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
| # thx https://karlstoney.com/2017/03/03/docker-containers-as-systemd-services/ | |
| [Unit] | |
| Description=Docker pgadmin4 | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| #Restart=always | |
| ExecStartPre=/bin/bash -c "/usr/bin/docker rm -f pgadmin4 || true" |
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 | |
| # 1) copy this file to target server (you may just use `nano` editor) | |
| # 2) run as ` script-name username password` (starting with space symbol to prevent writing password to bash commands history) | |
| ROOT_UID=0 | |
| SUCCESS=0 | |
| E_USEREXISTS=70 | |
| E_NOTROOT=67 | |
| # Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # https://stackoverflow.com/questions/67341992/constructor-with-return-generic-type-based-on-param-enum-ts2322/67376400#67376400 | |
| enum Enum { | |
| one = 'one', | |
| two = 'two', | |
| } | |
| type Type1 = { | |
| field: typeof Enum.one; | |
| anotherField: number; |