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/python3 | |
# acceptance criteria: | |
# - works without installing non-standard py3 modules | |
# - tested on *nix distros | |
# func ideas stub: | |
# DONE: fortune http://www.yerkee.com/api (computers science all) | |
# cat: hey you have your own! go to othercodes./cat http://thecatapi.com/ | |
# pokemon https://pokeapi.co/ https://pokeapi.co/docsv2/#pokemon |
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 | |
# | |
# Git Branch checkout after force push | |
# | |
# Execution: | |
# $ bash checkout.sh [branch] | |
sudo chown -R www-data ./ | |
echo "Fetching changes from origin..." | |
sudo -Hu www-data git fetch -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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
# Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
# Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -U postgres |
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://stackoverflow.com/questions/5350088/how-to-search-a-specific-value-in-all-tables-postgresql | |
CREATE OR REPLACE FUNCTION search_columns( | |
needle text, | |
haystack_tables name[] default '{}', | |
haystack_schema name[] default '{}' | |
) | |
RETURNS table(schemaname text, tablename text, columnname text, rowctid text) | |
AS $$ | |
begin | |
FOR schemaname,tablename,columnname IN |
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 | |
# | |
# PHP Installer (RH) | |
# | |
# Install all PHP versions and some extensions. | |
# | |
# Tested on: | |
# - CentOS Linux release 7.5.1804 (Core) | |
# | |
bash <(curl -s https://gist.githubusercontent.com/othercodes/ab66f49f2db94e1f40c2ab86003dc17c/raw/phprhinstaller.sh) |
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 | |
# | |
# Virtual Host Generator | |
# | |
# Apache virtual host generator. | |
# | |
# Tested on: | |
# - CentOS Linux release 7.5.1804 (Core) | |
# - Ubuntu 16.04.3 LTS | |
# |
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 | |
# | |
# LINKLER: Migration link generator | |
#========================================================= | |
# ██╗ ██╗███╗ ██╗██╗ ██╗██╗ ███████╗██████╗ | |
# ██║ ██║████╗ ██║██║ ██╔╝██║ ██╔════╝██╔══██╗ | |
# ██║ ██║██╔██╗ ██║█████╔╝ ██║ █████╗ ██████╔╝ | |
# ██║ ██║██║╚██╗██║██╔═██╗ ██║ ██╔══╝ ██╔══██╗ | |
# ███████╗██║██║ ╚████║██║ ██╗███████╗███████╗██║ ██║ | |
# ╚══════╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ |
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 | |
# | |
# PHP Mod Apache Installer (RH) | |
# | |
# Reconfigure the Apache Mod PHP. | |
# | |
# Tested on CentOS Linux release 7.5.1804 (Core) | |
# | |
# Execution: | |
# $ sudo ./morphpeus.sh |
NewerOlder