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/sh | |
# | |
# ******************************************* | |
# WARNING: this does *not* handle 3-way merges properly. | |
# Anything modified on the local branch since the common base will get ignored. | |
# | |
# FOR ANYONE LANDING HERE: | |
# This script is now updated as part of the git-whistles gem. | |
# https://github.com/mezis/git-whistles | |
# ******************************************* |
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 | |
# | |
# List branch status and age against an integration branch. | |
# | |
# Copyright (C) 2012 Julien Letessier | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
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 | |
# | |
# Close a feature branch - removing it from local and remote. | |
# | |
die() { | |
echo "$@" ; exit 1 | |
} | |
head=$(git symbolic-ref HEAD 2> /dev/null || git log -1 --format=%h) |
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
diff --git a/lib/tasks/gettext_rails.rake b/lib/tasks/gettext_rails.rake | |
index 28da8a4..ce63757 100644 | |
--- a/lib/tasks/gettext_rails.rake | |
+++ b/lib/tasks/gettext_rails.rake | |
@@ -3,7 +3,10 @@ namespace :gettext do | |
task :updatepo do | |
require 'gettext_rails/tools' | |
require 'preprocessing_erb_parser' | |
- GetText.update_pofiles("housetrip", Dir.glob("{app,lib,assets}/**/*.{rb,erb,rjs}").sort, "housetrip 1.0.0") | |
+ paths = Dir.glob("{app,lib,assets}/**/*.{rb,erb,rjs}").reject { |path| |
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
diff --git a/app/models/booking/messaging_trait.rb b/app/models/booking/messaging_trait.rb | |
index 7bec914..355cc0f 100644 | |
--- a/app/models/booking/messaging_trait.rb | |
+++ b/app/models/booking/messaging_trait.rb | |
@@ -82,7 +82,7 @@ module Booking::MessagingTrait | |
self.host_conversation.all_messages.detect{|m| m.is_a?(Message::WithGuestBooking)} | |
guest_message = self.tenant_info_sheet.andand.message | |
- if guest_message && !created_already | |
+ if guest_message.present? && !created_already |
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
require 'benchmark' | |
number_of_rails_methods = 300 | |
@rails = Class.new do | |
number_of_rails_methods.times do |i| | |
class_eval <<-RUBY | |
def call#{"%02d" % i} # def call01 | |
end # end | |
RUBY |
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
# in ~/.rbenv/rbenv.d/rehash/rbx-2.0.0.bash | |
make_shims "~/.rbenv/versions/rbx-2.0.0/gems/bin/*" | |
# in ~/.rbenv/rbenv.d/which/rbx-2.0.0.bash | |
if [ ! -x "$RBENV_COMMAND_PATH" ] && [[ $RBENV_VERSION =~ rbx-2 ]]; then | |
export RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/gems/bin/${RBENV_COMMAND}" | |
fi |
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 | |
# | |
# Heroku wrapper | |
# | |
require 'pathname' | |
app_basename = Pathname.new('.').realpath.basename.to_s | |
head_name = %x(git symbolic-ref HEAD).strip | |
branch_name = head_name.gsub(%r(^refs/heads/), '') |
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
diff --git i/config/deploy.rb w/config/deploy.rb | |
index 73fc910..594322c 100644 | |
--- i/config/deploy.rb | |
+++ w/config/deploy.rb | |
@@ -65,7 +65,7 @@ end | |
desc 'restart' | |
deploy.task :restart, :roles => :web do | |
- run "touch #{current_path}/tmp/restart.txt" | |
+ run "bash -c 'sleep $(( $RANDOM / 100 ))' ; date ; touch #{current_path}/tmp/restart.txt" |
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
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
OlderNewer