From 5970e9b968dafe78da9d65f65bd541adda51dd46 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Mon, 4 Jul 2022 22:13:41 +0800 Subject: [PATCH] Moved from ./install/todo --- experimental/flatpak | 12 ++++++++ experimental/oci8 | 49 +++++++++++++++++++++++++++++++ experimental/phpstorm-url-handler | 42 ++++++++++++++++++++++++++ experimental/samp-server | 46 +++++++++++++++++++++++++++++ experimental/wkhtmltopdf | 12 ++++++++ 5 files changed, 161 insertions(+) create mode 100755 experimental/flatpak create mode 100644 experimental/oci8 create mode 100644 experimental/phpstorm-url-handler create mode 100644 experimental/samp-server create mode 100755 experimental/wkhtmltopdf diff --git a/experimental/flatpak b/experimental/flatpak new file mode 100755 index 0000000..11d0b40 --- /dev/null +++ b/experimental/flatpak @@ -0,0 +1,12 @@ +#!/bin/bash +echo +echo "===============================================" +echo "Installing flatpak and its software..." +echo "===============================================" +echo + +sudo apt install -y --autoremove \ + flatpak \ + gnome-software-plugin-flatpak + +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo diff --git a/experimental/oci8 b/experimental/oci8 new file mode 100644 index 0000000..be401d9 --- /dev/null +++ b/experimental/oci8 @@ -0,0 +1,49 @@ +#!/bin/bash +echo +echo "===============================================" +echo "Installing oci8..." +echo "===============================================" +echo + +# https://www.oracle.com/cis/database/technologies/instant-client/downloads.html + +#check for +# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip +# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -- only libociicus.so +# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip +# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linuxx64.zip +# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip +#unzip + +sudo mkdir /opt/oracle/ +sudo mv ~/Downloads/instant_client/ /opt/oracle/ + +sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf" +sudo ldconfig + +sudo apt install -y --autoremove \ + php-dev \ + php-pear \ + build-essential \ + libaio1 \ + default-jdk +sudo pecl channel-update pecl.php.net +sudo pecl install oci8 # php8 +#sudo pecl install oci8-2.2.0 # php7 + +#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini" +# sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini" +# sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini +sudo phpenmod oci8 +php -i | grep oci8 + +# instantclient,/opt/oracle/instant_client + + + + + + + +# https://pecl.php.net/package/oci8 +#sudo pecl install oci8-2.2.0 diff --git a/experimental/phpstorm-url-handler b/experimental/phpstorm-url-handler new file mode 100644 index 0000000..f3dd8d6 --- /dev/null +++ b/experimental/phpstorm-url-handler @@ -0,0 +1,42 @@ +#!/bin/bash +echo +echo "===============================================" +echo "Installing phpstorm-url-handler..." +echo "===============================================" +echo + +installed() { + command -v "$1" >/dev/null 2>&1 +} + +# https://github.com/rozwell/phpstorm-url-handler/ +# https://askubuntu.com/a/1023143 +# https://askubuntu.com/a/919825 +# https://medium.com/swlh/custom-protocol-handling-how-to-8ac41ff651eb +# https://www.linuxquestions.org/questions/linux-desktop-74/xdg-open-doesn%27t-recognize-custom-protocol-4175433062/#post4809984 + +sudo rm -rf /usr/bin/phpstorm-url-handler >/dev/null +sudo rm -rf ~/.local/share/applications/phpstorm-url-handler.desktop >/dev/null +sudo rm -rf /usr/share/applications/phpstorm-url-handler.desktop >/dev/null +if installed "git"; then + sudo git clone https://github.com/rozwell/phpstorm-url-handler.git /usr/src/phpstorm-url-handler +else + sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /tmp/phpstorm-url-handler.zip + sudo unzip /tmp/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler + sudo rm -f /tmp/phpstorm-url-handler.zip +fi + +info "Copy .desktop" +sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler.desktop /usr/share/local/applications/phpstorm-url-handler.desktop + +info "Symlink bin" +sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler /usr/bin/phpstorm-url-handler + +info "desktop-file-install" +sudo desktop-file-install phpstorm-url-handler.desktop + +info "update-desktop-database" +sudo update-desktop-database -v 2>&1 | grep -E "^(.+)\/phpstorm-url-handler.desktop(.+)$" + +info "xdg-mime" +xdg-mime default phpstorm-url-handler.desktop x-scheme-handler/phpstorm diff --git a/experimental/samp-server b/experimental/samp-server new file mode 100644 index 0000000..9668e66 --- /dev/null +++ b/experimental/samp-server @@ -0,0 +1,46 @@ +#!/bin/bash +echo +echo "===============================================" +echo "Installing samp-server v03svr_R2-1..." +echo "===============================================" +echo + +# https://sampwiki.blast.hk/wiki/Linux_Server +# https://team.sa-mp.com/wiki/Server.cfg_RU.html + +cd $HOME +wget -qO - https://files.sa-mp.com/samp03svr_R2-1.tar.gz | tar -zxf - +# sudo dpkg --add-architecture i386 +# sudo apt update +# sudo apt install -y libc6:i386 +apt-get install ia32-libs + +echo "echo Executing Server Config... +lanmode 0 +rcon 1 +language Russian +rcon_password bootsector +maxplayers 50 +port 7777 +hostname My Server +gamemode0 bare 1 +filterscripts base gl_actions gl_property gl_realtime +announce 1 +query 1 +weburl +maxnpc 0 +onfoot_rate 40 +incar_rate 40 +weapon_rate 40 +stream_distance 800.0 +stream_rate 1000 +timestamp 1 +output 0 +" > $HOME/samp03/server.cfg + +ln -s $HOME/samp03/samp03svr /usr/local/bin/samp + +echo +echo "Success! Now run via 'samp &'" +echo + diff --git a/experimental/wkhtmltopdf b/experimental/wkhtmltopdf new file mode 100755 index 0000000..7a17438 --- /dev/null +++ b/experimental/wkhtmltopdf @@ -0,0 +1,12 @@ +#!/bin/bash +echo +echo "===============================================" +echo "Installing wkhtmltopdf..." +echo "===============================================" +echo + +# не тестировалось + +wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb" -O /tmp/wkhtmltopdf.deb +sudo dpkg -i /tmp/wkhtmltopdf.deb +rm /tmp/wkhtmltopdf.deb