Skip to content

Instantly share code, notes, and snippets.

View chaitu87's full-sized avatar

Chaithanya Padi chaitu87

View GitHub Profile
@chaitu87
chaitu87 / hash.sh
Created July 2, 2012 06:52
Hashpass shell script with xclip to copy password to clipboard
#!/bin/bash
#hashapass.com method for generating passwords
#script by Simon Elmir
export IFS="" #read will now preserve whitespace
read -rp "parameter: " PARAMETER
read -rsp "password: " PASSWORD
echo
echo -n "$PARAMETER" \
| openssl dgst -sha1 -binary -hmac "$PASSWORD" \
| openssl enc -base64 \
@chaitu87
chaitu87 / .htaccess
Created July 31, 2012 08:14
remove index.php in codeigniter
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
@chaitu87
chaitu87 / config.txt
Created August 25, 2012 05:44
AWS AMI apache2 mysql phpmyadmin php5
sudo su
yum install httpd
yum install mysql-server mysql
yum install php php-mysql
service httpd start
service mysqld start
/usr/bin/mysqladmin -u root password 'thepassword'
sudo yum install php-xml php-pdo php-odbc php-soap php-common php-cli php-mbstring php-bcmath php-ldap php-imap php-gd php-mcrypt
@chaitu87
chaitu87 / gist:3462684
Created August 25, 2012 08:56
Solution for not accessable Redhat AMI on AWS
iptables -F
service iptables save
@chaitu87
chaitu87 / sh.txt
Created August 27, 2012 09:29
Magento File Permissions from shell
chmod -R 777 tmp
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media
@chaitu87
chaitu87 / commands.txt
Created September 19, 2012 10:52
Magento mcrypt installation in redhat 6
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
rpm -Uvh php-mcrypt-5.3.3-1.el6.x86_64.rpm libmcrypt-2.5.8-9.el6.x86_64.rpm
@chaitu87
chaitu87 / gist:3750128
Created September 19, 2012 14:59
Mysql_connect() error in REDHAT AWS
error in cofiguration of SELINUX
execute as root
`setsebool -P httpd_can_network_connect 1`
@chaitu87
chaitu87 / gist:4451209
Last active June 16, 2018 10:35
Rails app on EC2 & GCE [Ubuntu Instance]
Setting Up Ruby & Ruby on Rails
=================================
sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev
curl -L get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
rvm install 2.3.3
rvm use 2.3.3 --default
gem install rails --no-ri --no-rdoc
@chaitu87
chaitu87 / txt
Created November 1, 2013 08:35
List of sites
17dnorth.com
abhyaas.in
adroittraining.com
apreddysangam.org
ashrayakruti.org
asst.in
avensonline.org
behealthy.tv
bharathvullanki.com
bhumi.in
@chaitu87
chaitu87 / arachni-json.sh
Created November 14, 2013 08:49
JSON Report
arachni -fv http://test.com --report=json:outfile=test.com.json