Skip to content

Instantly share code, notes, and snippets.

View emprit1988's full-sized avatar

prithivirajan emprit1988

  • Chennai
View GitHub Profile
@emprit1988
emprit1988 / gist:5e8b74c632b42725437c407541758411
Created April 4, 2017 17:43
Phppgadmin - You don't have permission to access /phppgadmin on this server.
OS: Ubuntu 14.04
Error: You don't have permission to access /phppgadmin on this server.
Comment: After fresh installation of phppgadmin, apache2 may not allow you to access phppgadmin. To fix this follow the below
steps.
1. copy /etc/apache2/conf.d/phppgadmin to apache2/conf enabled
copy /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
2. edit phpadmin.conf and uncomment allow from all
#allow from all => allow from all
Basics of RESTful API design
Your API should be designed around the idea of resources.
Resources represent things (nouns) and not behaviors (verbs).
Each resource should have a canonical/unique url (api/users/bill, api/users/mary).
Return all resource properties in the return payload.
cron.schedule('* * * * * *', function(){
//runs every second
});
cron.schedule('* * * * *', function(){
//runs every minute
});
cron.schedule('2 * * * * *', function(){
//still runs every minute
##Install Prerequisites
sudo apt-get install g++ # or clang++ (presumably)
sudo apt-get install autoconf automake libtool
sudo apt-get install autoconf-archive
sudo apt-get install pkg-config
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg8-dev
sudo apt-get install libtiff5-dev
sudo apt-get install zlib1g-dev
@emprit1988
emprit1988 / install_ssl.txt
Created June 4, 2018 17:18
Install Entrust SSL in NGINX Server running in Ubuntu 14.04
Step 1: Create chained certificate with the provided crt files. Ordering is important.
~$ cat Server.crt Intermediate.crt Root.crt > Chained_certificate.crt
Step 2: Format the concatenation
The crt file should Follow the syntax
-----Start Certificate-----
############################
############################
-----End Certificate-----
@emprit1988
emprit1988 / docker-fix.txt
Created October 12, 2018 05:40
Docker Permission Fix
Running docker as non-root user
Note: Should run every command in the user account.
Step 1: Create the docker group.
$ sudo groupadd docker
Step 2: Add your user to the docker group.
$ sudo usermod -aG docker $USER
Step 3: Change ownership to the current user
@emprit1988
emprit1988 / README.txt
Created November 16, 2018 10:41
Install Java 11 in ubuntu 18.04
Step 1: Download JDK from Oracle
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Step 2: Install the package
sudo dpkg -i jdk-11.0.1_linux-x64_bin.deb
Step 3: Config Java (use jdk-xx.x.x based on your downloaded version)
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-11.0.1/bin/java 2
sudo update-alternatives --config java
@emprit1988
emprit1988 / gist:503d52066bc64311e313a285aaef7616
Created November 28, 2018 07:45
Remove postgres and install Postgres 10 (Ubuntu 14.04)
Step1: Take dump of all your databases
pg_dumpall > outputfile
Step2: Uninstall Postgres
dpkg -l | grep postgres
Step3: Get list of all postgres related packages from Step 2 and form purge command
sudo apt-get --purge remove postgresql postgresql-8.3 postgresql-client postgresql-client-8.3 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-8.3
Step4: Remove all data directories
@emprit1988
emprit1988 / gist:200ee04eaa12408362b5d8952113b24a
Created March 13, 2019 13:33
Checklist to consider new technology
What problem does it solve and How was it addressed earlier?
How fast is it?
What runtimes can we use (X) in?
What are we doing for resiliency? For example, what are we doing to make sure the (X) service stays up?
How do we handle restarts?
How are we measuring the latency of the service?
What are the costs involved in building (X)?
What reports and dashboards will be available to us to help us understand what problems we could face?
How much in percentage of our business can use (X)?
What are its limitations?
@emprit1988
emprit1988 / gist:9038a8ecfbe40c710fae38ee23793987
Last active May 7, 2019 14:14
Setup Java , Spring CLI , IntelliJ , Maven
sudo apt-get update
sudo apt-get install default-jre
sudo apt-get install default-jdk
get path from:
sudo update-alternatives --config java
sudo gedit /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-oracle"