Skip to content

Instantly share code, notes, and snippets.

@jaswanth03
jaswanth03 / git-accounts-configurations
Created October 16, 2019 10:20
this is used to remove the previously configured git lab / git hub accounts
Go to
Control Panel > User Accounts > Credential Manager > Windows Credentials.
You will see Git credentials in the list (e.g. git:https://).
Click on it, update the password, and execute git pull/push command from your Git bash and it won't throw any more error messages
@jaswanth03
jaswanth03 / angular-libraries
Created September 20, 2019 05:37
These are some usefull libraries for angular development.
# To Share images/links to social media from angular app
https://murhafsousli.github.io/ngx-sharebuttons/#/share-buttons-component
@jaswanth03
jaswanth03 / server-timezones-centos
Created September 12, 2019 13:22
changing the srever timezones in centos 7
// to change the server time zone
# timedatectl set-timezone Asia/Kolkata
// To find list of all available time zones, run:
# timedatectl list-timezones
##*** Grep possible Asian timezones ***##
# timedatectl list-timezones | grep Asia
// Verify the server time settings by typing the following two commands:
@jaswanth03
jaswanth03 / install-php-mail-server
Created September 12, 2019 08:00
installing php mail server inapache server centos
Configure php mail service in centos 7
Sending Email via PHP in CentOS 7 using Sendmail
Step1: Install the below library
# yum install sendmail
Step2: Allowing your server to send emails,
If you are using SELinux on your CentOS 7 server, you have to allow sendmail to send emails using the following command:
# setsebool -P httpd_can_sendmail=on
// ======steps to gZip in the server=============
1) apachectl -t -D DUMP_MODULES |grep deflate
2) create a file in cd /etc/httpd/conf.d
."nano mod_deflate.conf"
3) add the below code in the above created file.
<filesMatch "\.(js|html|css)$">
SetOutputFilter DEFLATE
@jaswanth03
jaswanth03 / database-migration-steps
Last active September 12, 2019 07:56
migrating huge databases from one server to another server
How to create large db dumps from one db to other db
STEP 1 : GO to Home directoryin the phpmyadmin and go to export db
STEP 2 : Choose the custom export option and select your options and dump the db.
NOTE : If you are going to export the whole Db's into a new server then you have to select what db;s you want to dump and you have to check Add CREATE DATABASE / USE statement in the options listed.
STEP 3 : Now you get a sql dump file which can be imported in any server.
STEP 4 : If you have your server access then go to
# /etc/phpMyAdmin/config.inc.php
@jaswanth03
jaswanth03 / Increase-db-connections
Created September 12, 2019 07:53
to increase the db connections if there is more user accessing the db by default the db max connections in 151
// execute the below commands in the phpmyadmin of your server.
// cmd for getting the max database connections.
# show variables like "max_connections";
// cmd to increase the max database connections
# set global max_connections = 200;
@jaswanth03
jaswanth03 / PHP-myANMIN-set-default-empty
Created September 12, 2019 07:50
set default to empty in phpmyadmin
Field 'id'(column name) doesn't have a default value and you are not passing any value in the INSERT query.
NOTE : you have to configure the database in order to handle this special case by default you have to pass any data if the column default is mentioned as none, if it is mentioned default as NULL then no need to do any thing.
There are 2 solutions mentioned below:
Solution 1
MySQL is most likely in STRICT SQL mode. Try to execute SQL query SET GLOBAL sql_mode='' or edit your my.cnf / my.ini to make sure you aren't setting STRICT_ALL_TABLES and/or STRICT_TRANS_TABLES.
Solution 2
@jaswanth03
jaswanth03 / Server-snippets
Last active September 12, 2019 13:20
some snippets to work on server
// to add a new JAVA environment to the server.(whether it is a test/development.)
."nano .bash_profile"
// add the below line inside this.
."export SPRING_PROFILES_ACTIVE=dev" (specify your configuration name here.)
// after every configuration changeds in the OS execute the below command.
."source filename"
// to open ports in the cent os