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 bash | |
| # | |
| # ВАЖНО. mail.ru время от времени меняет внутрянку, не очень сильно, но требуется адаптация скрипта. | |
| # Если скрипт не работает, просьба разместить патч в комментариях или сделать работающий форк. | |
| # 2018-06-18 updated: mail.ru changed internals | |
| # 2017-09-22 original idea: https://novall.net/itnews/bash-skript-dlya-skachivaniya-fajlov-s-mail-ru-cherez-konsol-linux.html | |
| # 26/04/2019 downloading fixed (thanks to @dinolek ) .......updated by - @vishalk17 |
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 bash | |
| ### Initial repo upload keeping file timestamps | |
| if [ ! -n "$1" ]; then | |
| echo "usage $0 <https://user@bitbucket.org/user/repo.git>" | |
| exit 1 | |
| fi | |
| if [ "$(uname -s)" == "FreeBSD" ]; then | |
| stat_args="-f%m:%N" |
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/sh | |
| HOSTNAME=$(hostname) | |
| sudo apt-get update | |
| sudo apt-get install -y nginx | |
| sudo apt-get install -y mysql-server mysql-client | |
| sudo apt-get install -y php-fpm | |
| sudo apt-get install -y composer |
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/sh | |
| # https://gist.github.com/ClayRabbit/0441561b409fe631a6ab5df88e759b37 | |
| # OpenCart invoker for crontab or CLI | |
| # Alternative to `wget -O- -qt 1 https://...` | |
| [ -z "$1" ] && echo "Usage: $0 [options] [admin/]extension/module/route1 [extension/module/route2 ...]" && exit 1 | |
| initial_dir="$(pwd)" | |
| oc_dir=$(cd $(dirname "$0") && pwd) | |
| php="$(env which 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/sh | |
| # file: ttfb.sh | |
| # curl command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb.sh "https://google.com" | |
| # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
| curl -so/dev/null -w"Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" "$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
| <?php | |
| /** | |
| * Simple PHP 301 redirect script: Space separаted list of redirects loaded from redirect.txt | |
| * | |
| * @author Andrey Chesnakov | |
| * @link https://clayrabbit.ru | |
| */ | |
| if (!empty($_SERVER['REQUEST_URI']) AND $_SERVER['REQUEST_URI'] != '/' AND file_exists('redirect.txt')) { | |
| $request = explode('?', $_SERVER['REQUEST_URI'], 2); | |
| foreach(file('redirect.txt') as $str) { |
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/sh | |
| # install Midnight Commander locally (without root) | |
| wget https://download.opensuse.org/repositories/home:/laurentwandrebeck:/mc/CentOS_7/x86_64/mc-4.8.27-1.1.x86_64.rpm | |
| (mkdir rpm && cd rpm/ && rpm2cpio ../mc-4.8.27-1.1.x86_64.rpm | cpio -idv) | |
| echo "export MC_DATADIR=~/rpm/usr/share/mc" >> .bashrc | |
| echo "alias mc=~/rpm/usr/bin/mc" >> .bashrc | |
| cp -rp rpm/usr/libexec/mc/* .local/share/mc/ |
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
| <style> | |
| .read-more.collapse { | |
| position: relative; | |
| display: inherit; | |
| height: auto !important; | |
| transition: none !important; | |
| } | |
| .read-more.collapse.in, | |
| .read-more.collapsing { | |
| position: relative; |
OlderNewer