Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Rahul Mahale RahulMahale

🏠
Working from home
Block or report user

Report or block RahulMahale

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
View enable application logs of Nginx behind the AWS ELB
####If you are using AWS ELB and nginx as an web server,
####to enable the access logs with details add the following diriectives to your nginx configuration
real_ip_header X-Forwarded-For;
set_real_ip_from 10.70.0.0/16;
View tricks.md

Find all the files with extension recursively

find . -name \*.txt -print

Reconfigure networking for the lxc containers to assign IP address.

sudo dpkg-reconfigure -p medium lxd

View removervm.sh
#!/bin/bash
rvm reset
rvm uninstall 2.2.7
rvm implode --force
sed -i '/rvm/d' ~/.bash_profile
sed -i '/rvm/d' ~/.profile
sed -i '/rvm/d' ~/.bashrc
sudo mv /usr/local/rvm /tmp/
View installrubyrbenv.sh
cd ~/
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
echo "gem: --no-document" > ~/.gemrc
gem install bundler
View deploy-with-resources.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
View wordpress-mysql.yml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
You can’t perform that action at this time.