Skip to content

Instantly share code, notes, and snippets.

View lsmolic's full-sized avatar

Lucas Smolic lsmolic

View GitHub Profile
@lsmolic
lsmolic / gist:6084955
Created July 26, 2013 00:05
changes to asset auto_deploy
desc <<-DESC
Deploy the system directory to production
DESC
task :fs, :roles => :web, :once => true do
servers = find_servers_for_task(current_task)
puts "SERVERSSSSSSS......>>>>>>>> #{servers}"
servers.each do |server|
port = 22
Array(fetch(:sync_directories, [])).each do |syncdir|
destination, base = Pathname.new(syncdir).split
#CONFIG TERMINAL
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
#sets up the prompt color (currently a green similar to linux terminal)
#enables color for iTerm
export TERM=xterm-color
export EC2_HOME=/Users/lsmolic/.ec2
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
#export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home
class YourBody {
boolean is_moving = false;
String[] known_actions = { "Forward", "Backward", "Left", "Right" };
boolean validRequest( String this_action ){
for ( int i = 0; i < known_actions.length; i++)
{
if ( known_actions[i] == this_action )
{
return true;
class YourBody {
boolean is_moving = false;
String[] known_actions = { “Forward”, “Backward”, “Left”, “Right” };
boolean validRequest( String this_action ){
for ( int i = 0; i < known_actions.length; i++)
{
if ( known_actions[i] == this_action )
{
return true;
#!/usr/bin/env bash
ruby_string="ruby-1.8.7-p357"
#ruby_string="ruby-1.9.3-p194"
gemset_name="cke2"
if rvm list strings | grep -q "${ruby_string}" ; then
# Load or create the specified environment
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
@lsmolic
lsmolic / gist:2628430
Created May 7, 2012 15:31
Git Branch in console prompt
function parse_git_branch
{
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /'
}
function proml
{
PS1="[\w\$(parse_git_branch)]$"
}
proml