Very Good article on Setting up LAMP Stack on El Capitan: http://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/ On OS X Yosemite/El Capitan to start/stop/restart MySQL post 5.7 from the command line: sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
MySQL Ramp Up
MYSQL: Add Column to Existing Table and Make it Auto Increment and Add Primary Key Constraint Link : Alter Table and Add Column ALTER TABLE StudentPortalData ADD StudentPortalDataID INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (StudentPortalDataID); Query Plan and Query Profile for Executed Queries …
Apache Drill Setup and Usuage
Apache Drill Setup and Usuage: Install and Configure Apache Drill http://drill.apache.org/docs/installing-drill-on-windows/ sqlline> !connect “jdbc:drill:zk=local” Enter username for jdbc:drill:zk=local: admin Enter password for jdbc:drill:zk=local: ***** http://localhost:8047/ SELECT derivedtable.ItemID ,AVG( CAST (derivedtable.TimeSpent AS INTEGER)) AvgTimeSpent FROM ( SELECT rawresponsetime.Time10.`id` ItemID ,rawresponsetime.Time10.`value` `TimeSpent` FROM ( SELECT (flatten(`time`)) `Time10`, …
Attaching Volume to EC2 Instance
Attaching Volume to EC2 Instance To list the partitions $ cat /proc/partitions major minor #blocks name 202 1 52428800 xvda1 Create a Volume in EC2 Instance and attach it to the instance. $ cat /proc/partitions major minor #blocks name 202 …
NGINX Protect Domain through Password
NGINX Protect Domain through Password It’s very easy to place a simple htpasswd-based authentication system on a domain served by nginx. To do this, you’ll want your server block to look like this: server { listen 80; server_name domain.com; root /site/root; index index.html index.htm; auth_basic …
NGINX and APACHE URL Redirects
NGINX APACHE URL Redirects Redirect all the requests to https server { listen 80; server_name i90runner.com; rewrite ^ https://$server_name$request_uri? permanent; } Redirect Specific Pages rewrite /humor /humor/humor.php; rewrite /events/search /Events/events_search.php; rewrite /events/summary /Events/events_summary.php; rewrite /photos /photos/index.php; rewrite /help /Technology/blog.php?ID=344; rewrite /hikes /Technology/blog.php?ID=386; Redirect based on …
Change HostName in Linux Machines
Change HostName in Linux Machines Edit /etc/hostname , make the name change, save the file. You should also make the same changes in /etc/hosts file Run sudo /etc/init.d/hostname restart or sudo service hostname restart /etc/hostname /etc/hosts sudo /etc/init.d/hostname restart sudo service hostname restart
PHP Drivers for MSSQL Issues
PHP Drivers for MSSQL Issues I wanted to setup my Mac Book Pro to access the SQL Server RDS Instance on AWS.My intial thinking was just google on how to setup PHP Drivers on Mac OSX and follow the steps. So I thought it shouldn’t …
Helpful Linux Commands
Helpful Linux Commands Find whats on port running on a particular port : ex port 8098 $ sudo netstat -apn | grep 8098 tcp 0 0 10.224.35.187:8098 0.0.0.0:* LISTEN 19666/beam.smp Find status of a particular process : ex status of riak $ sudo /etc/init.d/riak status …
Git Cheat Sheet
Git Quick Reference Adding the ShortCut: $ git config –global alias.add-commit ‘!git add -A && git commit’ $ git add-commit $ git config –global –edit [user] name = Raju email = [email protected] [gui] recentrepo = C:/Git [alias] add-comment = !git add -A && git commit …