Skip to content

Instantly share code, notes, and snippets.

View samuels410's full-sized avatar
🎯
Focusing

samuel santhosh samuels410

🎯
Focusing
View GitHub Profile
@samuels410
samuels410 / gist:0464703dc2a581b8909d
Created November 5, 2015 10:54 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@samuels410
samuels410 / change_db_owner.sh
Last active September 13, 2015 05:05 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
@samuels410
samuels410 / a-server-setup.sh
Created August 14, 2015 11:44
First time server setup
sudo apt-get update && /
sudo apt-get install byobu && /
sudo apt-get install vim && /
sudo apt-get install htop && /
sudo apt-get install postgresql-9.3
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@samuels410
samuels410 / no-pass.sh
Created December 1, 2014 09:34
Create Multiple SSH Configurations to login remote servers without asking password
#!/bin/bash
# Create Multiple SSH Configurations
#1. Clone the script
#2. chmod +x no-pass.sh
#3. ./no-pass.sh
touch ~/.ssh/config || exit
echo -e "\e[33m Enter domain/ipaddress which you want to ssh:"
read domain_name
#!/bin/sh
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.
set -e
APP_PATH="/srv/rails/seek"
start_job() {
echo "Starting delayed job"
#!/bin/sh
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.
set -e
APP_PATH="/var/deploy/app/current"
start_job() {
echo "Starting delayed job"