Skip to content

Instantly share code, notes, and snippets.

View psgganesh's full-sized avatar
🤖
Currently exploring: DS and ML

Shankar Ganesh psgganesh

🤖
Currently exploring: DS and ML
View GitHub Profile
@psgganesh
psgganesh / reference.md
Last active July 12, 2017 03:38
Eloquent Accessors and Mutators

Laravel Eloquent Accessors and Mutators

Eloquent Accessors - All "get's" getFirstNameAttribute( $value ) ...

Eloquent Mutators - All " set's " setFirstNameAttribute( $value ) ....

How to use

Declare in your model files

Where to use

@psgganesh
psgganesh / Digital ocean Floating IPs
Last active March 7, 2017 03:38
Using digital ocean floating IPs
Complete tutorial
https://www.digitalocean.com/community/tutorials/how-to-create-a-high-availability-haproxy-setup-with-corosync-pacemaker-and-floating-ips-on-ubuntu-14-04
Below is the main trouble-shooting steps missed on the above post.
As per: Pathfinder - https://www.digitalocean.com/community/users/pathfinder - Run below also.
sudo apt-get install python-pip
sudo pip install requests
@psgganesh
psgganesh / Digital ocean publickey denied
Last active March 10, 2018 20:17
Unable to access digital ocean after rebuild droplet ?
Login to console using digital ocean's browser based shell, login using root and the new password generated,
and carry on with below steps
sudo nano /etc/ssh/sshd_config
Change
UsePAM yes
IgnoreUserKnownHosts no
@psgganesh
psgganesh / ubuntu 16 vagrant
Created December 22, 2016 11:12
Ubuntu 16 vagrant
#Fix locale issue
http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
sudo locale-gen en_US.UTF-8
# UFW rules to be enabled and added
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands
# Maria DB
http://idroot.net/linux/install-mariadb-ubuntu-16-04/
@psgganesh
psgganesh / mautic.conf
Created September 14, 2016 14:36
Simple mautic nginx config
server {
server_name <domain name>;
listen 80;
root /var/www/social/public_html;
access_log /home/mautic/site/logs/access.log;
error_log /home/mautic/site/logs/error.log;
index index.php;
@psgganesh
psgganesh / 12.04-ubuntu14.04.sh
Created July 23, 2016 15:29
12.04 to 14.04 upgrade sh
sudo apt-get update
sudo apt-get install update-manager-core
lsb_release -a
sudo do-release-upgrade --check-dist-upgrade-only --devel-release
sudo do-release-upgrade --devel-release
@psgganesh
psgganesh / grub2.sh
Created July 15, 2016 12:21
Grub2 on ubuntu 12.04
# Grub 2
sudo sed -i '$ a\deb http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/ /' /etc/apt/sources.list
wget -q http://download.opensuse.org/repositories/home:ksmanis/xUbuntu_12.04/Release.key -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install kcm-grub2
@psgganesh
psgganesh / 0_luna_dev.sh
Last active July 24, 2016 14:37
Elementary OS [ luna essentials ]
# Name: 0_luna_dev.sh
# Description: Automated setup of dev tools for elementary OS
# Author: Shankar <psgganesh@gmail.com>
# Twitter handle: @psgganesh
# USAGE
# CURL or WGET the RAW URL of this file and run below two commands
# 1. chmod +x lumen.sh
# 2. sudo bash ./lumen.sh
# Check your browser with the IP address of the host machine and viola, you have lumen installed
@psgganesh
psgganesh / node-npm.sh
Created June 22, 2016 17:24
Ubuntu 10.04 dev setup
sudo apt-get update
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
clear
node -v
@psgganesh
psgganesh / device.css
Created April 15, 2016 18:25 — forked from jsoverson/device.css
Quick css hacks to target android/ios
.visible-android {
display:none;
}
.visible-ios {
display:none;
}
.on-device .visible-android, .on-device .visible-ios {
display:inherit;
}
.device-ios .visible-android {