This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ruby | |
useradd -d /home/app -m -s /bin/bash app | |
apt-get update | |
apt-get -y install git curl | |
su - app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repository="$1" | |
destination="$2" | |
git clone https://github.com/$repository $destination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A Ruby script to delete files older than X days in a given directory. Pretty simple. | |
# Like this: file_control.rb /User/pelgrim/Documents '*.pdf' 7 | |
# The command above you remove ALL your pdfs inside Documents older than SEVEN DAYS. | |
# Quickly written by pelgrim < guskald at gmail dot com > | |
unless ARGV.size == 3 | |
puts "Usage: file_control <directory> <filename pattern> <max age>" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for generating deb packages Like a Boss | |
# Developed by Lucas Vieira <lucas at heap dot com dot br> | |
# Exit with error when things go bad | |
if [ $# -ne 1 ] || [ ! -e "$1/DEBIAN/control" ]; then | |
echo "Bad argumentation. Try ./create_pkg [package_dir]" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#BIRTMD Is a Rails Template for Mongoid and Devise | |
#rails new your_project_name -m birtmd.rb | |
#Doesn't work for rails 3.1 (:() | |
gem('jquery-rails','1.0.12') | |
generate('jquery:install') | |
gem('mongoid','2.0.2') | |
gem('bson_ext') | |
generate('mongoid:config') | |
gem('devise','1.4.2') |