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
#!/bin/sh | |
nocolor='33[0m'; | |
color0='33[0;30m'; | |
color1='33[0;31m'; | |
color2='33[0;32m'; | |
color3='33[0;33m'; | |
color4='33[0;34m'; | |
color5='33[0;35m'; | |
color6='33[0;36m'; | |
color7='33[0;37m'; |
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
map $http_origin $allow_origin { | |
~^https?://(.*\.)?my-domain.com(:\d+)?$ $http_origin; | |
default ""; | |
} | |
upstream websocket { | |
server localhost:3001; | |
} | |
server { |
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
echo '.list_container.hide{margin-bottom:50px !important}' >> themes/original/css/theme.css | |
sed -i 's/#pma_navigation{background:#fff;/#pma_navigation{background:#d00;/g' themes/original/css/theme.css | |
sed -i 's/#pma_navigation_tree li.selected{color:#000;background-color:#eee}/#pma_navigation_tree li.selected{color:#000;background-color:#b00}/g' themes/original/css/theme.css | |
sed -i 's/body{font-family:sans-serif;/body{font-family:Ubuntu,sans-serif;/' themes/original/css/theme.css | |
sed -i '5,9d' templates/login/header.twig |
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
ffmpeg -i input.jpg -vf scale=320:240 output_320x240.jpg | |
ffmpeg -y -i input.jpg -vf "scale='min(500,iw)':'min(500,ih)'" output_500x500.png | |
ffmpeg -y -i input.jpg -vf "crop=in_h" output_center.png | |
ffmpeg -y -i input.jpg -vf "scale=w='min(500,in_h):h=-1'" output_center1.png | |
ffmpeg -y -i input.jpg -vf "scale=w='min(1000,in_h):h=-1',crop=out_w=in_h,scale=w='min(200,in_h):h=-1" output_center2.png | |
ffmpeg -i input1.mov -vcodec copy -acodec copy out1.mp4 | |
ffmpeg -i input1.mov -q:v 0 output1.mp4 | |
ffmpeg -i input.mkv -codec copy output.mp4 | |
#ffmpeg -i 1000x1250.jpg -vf scale=w=300:h=300:force_original_aspect_ratio=increase,crop=300:300 temp.jpg -y |
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
# /etc/logrotate.d/mysql_general | |
/var/lib/mysql/platonus.log{ | |
compress | |
dateext | |
maxsize 300M | |
copytruncate | |
maxage 365 | |
dateformat -%Y%m%d%s | |
hourly |
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://askubuntu.com/questions/895492/kernel-panic-vfs-cannot-open-root-device-or-unknown-block-error-6 | |
sudo update-initramfs -u -k $(uname -r) | |
https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0 | |
sudo fdisk -l | |
sudo mount /dev/sda2 /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
type ErrNegativeSqrt float64 | |
func (e ErrNegativeSqrt) Error() string { |
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
listen_port=2221 | |
local_umask=002 | |
pasv_enable=YES | |
pasv_max_port=50000 | |
pasv_min_port=40000 | |
pasv_address=111.112.11.12 | |
pasv_addr_resolve=NO | |
listen_ipv6=no |
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
date | |
sudo apt update | |
apt list --upgradable | |
sudo apt -y upgrade | |
sudo apt autoclean | |
sudo apt autopurge | |
sudo apt autoremove --purge | |
if [ -f /var/run/reboot-required ]; then | |
echo 'reboot required' |
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
wget https://gist.githubusercontent.com/Max95Cohen/7af5c9db2c003cb0c032265c77a14907/raw/1d51080f12a88846e6ff6188cace28c8cae58530/git.sh | |
wget https://gist.githubusercontent.com/Max95Cohen/e86448c0e258703d604c98992fb5e55d/raw/3c824eddd6f1b42dfc8b888510083e00dfe2b0c4/.vimrc | |
sed -i 's/ls --color=auto/ls --color=auto --group-directories-first/' .bashrc | |
sed -i '59i PROMPT_COMMAND="source /home/aibekq/git.sh";' .bashrc | |
sed -i '60i \ ' .bashrc | |
echo "PS1='${debian_chroot:+($debian_chroot)}[\e[0;33m\t\e[0m] \e[1;36m\w \e[0;30m\j \e[1;31m$git_branch\n\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $ '" >> .bashrc | |
echo "alias rm='rm -i';" >> .bashrc | |
echo "eval \$(ssh-agent);" >> .bashrc |
NewerOlder