Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ankit Mehta ankyit

🎯
Focusing
Block or report user

Report or block ankyit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ankyit
ankyit / Go-Install-Ubuntu
Created Jul 25, 2019
Go / Node #100daysofcode
View Go-Install-Ubuntu
1. Switch to root account
2. Navigate to /tmp
3. Download source by Running: wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
4. Extract files to /usr/local (update version number if needed) tar -C /usr/local -xzf go1.12.7.linux-amd64.tar.gz
5. edit /etc/.profile and add export PATH=$PATH:/usr/local/go/bin
6. source /etc/.profile
@ankyit
ankyit / 1. Installing Python - CentOS
Last active May 21, 2019
Python Programming - AOS
View 1. Installing Python - CentOS
sudo -i
yum groupinstall -y "development tools"
yum install -y \
libffi-devel \
zlib-devel \
bzip2-devel \
openssl-devel \
ncurses-devel \
sqlite-devel \
readline-devel \
View aliyun-daily-db-backup.sh
#! /bin/bash
DEST_DIR=$PWD/backup/daily/database/
COMPRESSED_DIR=$PWD/backup/daily/database-compressed/
OSSPTH=oss://<OSS_BUCKET>
DATABASE_NAME=<Database_Name>
MYSQL_USER=<Database_User>
MYSQL_PASS=<Database_Password>
View User-commands.txt
### Go to the WordPress installation directory and apply following commands
1. To get list of users
wp users list
2. To get list of user login
wp users list --field=user_login
3. Update user password
wp user update <User_ID> --user_pass='Suer_Secure_Password'
View postgres-9.4-install-1604.sh
#! /bin/bash
sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt xenial-pgdg main"
sudo wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.4
@ankyit
ankyit / .htaccess
Created Jul 13, 2018
WordPress Optimization htaccess
View .htaccess
<IfModule mod_expires.c>
ExpiresActive on
<FilesMatch "\.(gif|jpeg|jpg|png|ico|js|css|swf|svg)$">
ExpiresDefault "access plus 365 days"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML und fonts
@ankyit
ankyit / postgres-9.4-install.sh
Created Jun 30, 2018
Install PostGres 9.4 on Ubuntu 17.10
View postgres-9.4-install.sh
#! /bin/bash
sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt zesty-pgdg main"
sudo wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.4
@ankyit
ankyit / WordPress Performance.txt
Last active Nov 19, 2018
WordPress Performance
View WordPress Performance.txt
### Sites:
https://gtmetrix.com/
https://developers.google.com/speed/pagespeed/insights/
### Plugins
https://wordpress.org/plugins/query-monitor/
https://wordpress.org/plugins/autoptimize/
https://wordpress.org/plugins/wp-super-cache/
https://wordpress.org/plugins/ewww-image-optimizer/
https://wordpress.org/plugins/jetpack/
@ankyit
ankyit / HideAdminNags.info
Last active Jun 26, 2018
Hide WordPress Admin Nags
View HideAdminNags.info
/* Install Admin CSS MU and paste the following CSS code */
.update-nag, .updated, .error, .is-dismissible, .notice {
display: none;
}
@ankyit
ankyit / wordpress_install.info
Last active Jul 5, 2018
WordPress Installation
View wordpress_install.info
### Update the Server
apt-get update
apt-get upgrade
##Install webserver, PHP and MariaDB
apt-get install nginx php php-cli php-common php-curl php-dev php-fpm php-gd php-intl php-json php-mbstring php-mysql php-opcache php-readline php-soap php-xml php-zip mariadb-server
##Secure Maria DB and create database
mysql_secure_installation
mysql -i
You can’t perform that action at this time.