This file contains 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
# | |
# Main | |
# | |
if __FILE__ == $0 | |
end |
This file contains 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 | |
file_name=`date +%Y%m%d_%H%M`_svn.dump.gz | |
home=/home/subversion | |
svn=$home/svn | |
svnadmin dump $svn | gzip > $home/$file_name | |
smbclient //HS-DTGL5C9/share -U administrator -N -c "put ${home}/${file_name} /Backup/${file_name}" | |
rm $home/$file_name |
This file contains 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
# redmine-supybot-plugin / init.rb | |
require_dependency 'supy_issue_hook' | |
# redmine-supybot-plugin / lib / suppy_issue_hook.rb | |
class SupyIssueHook < Redmine::Hook::Listener | |
def controller_issues_new_after_save(context = { }) | |
subject = context[:issue].subject | |
project = context[:project].description |
This file contains 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
# redmine-budget-plugin / init.rb | |
require 'redmine' | |
# Budget requires the Rate plugin | |
begin | |
require 'rate' unless Object.const_defined?('Rate') | |
rescue LoadError | |
# rate_plugin is not installed | |
raise Exception.new("ERROR: The Rate plugin is not installed. Please install the Rate plugin from https://projects.littlestreamsoftware.com/projects/redmine-rate") |
This file contains 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
Here is what I propose for hooks in views: | |
view_[path_to_the_view]_[position_in_view] | |
Examples: | |
view_layouts_base_html_head -- the only one that was committed | |
view_issues_show_details_bottom | |
view_issues_list_table_header | |
view_issues_list_table_row |
This file contains 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
##################################################################### | |
# samples/a.rb | |
##################################################################### | |
require 'main' | |
ARGV.replace %w( 42 ) if ARGV.empty? | |
Main { | |
argument('foo'){ |
This file contains 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
# http://www.brynary.com/2008/8/3/our-git-deployment-workflow | |
class GitCommands | |
def diff_staging | |
`git fetch` | |
puts `git diff origin/production origin/staging` | |
end | |
def tag_staging(branch_name) |
This file contains 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
# Path to your oh-my-fish. | |
set fish_path $HOME/.oh-my-fish | |
# Theme | |
set fish_theme agnoster # cean # zish # bobthefish # cmorrell.com # robbyrussell | |
# All built-in plugins can be found at ~/.oh-my-fish/plugins/ | |
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/ | |
# Enable plugins by adding their name separated by a space to the line below. | |
set fish_plugins theme git rbenv rails brew bundler gem osx pbcopy better-alias gi peco z tmux |
This file contains 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
function fish_prompt | |
if not set -q -g __fish_robbyrussell_functions_defined | |
set -g __fish_robbyrussell_functions_defined | |
function _git_branch_name | |
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
end | |
function _is_git_dirty | |
echo (git status -s --ignore-submodules=dirty ^/dev/null) |
This file contains 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
function _peco_change_directory | |
if [ (count $argv) ] | |
peco --layout=bottom-up --query "$argv "|perl -pe 's/([ ()])/\\\\$1/g'|read foo | |
else | |
peco --layout=bottom-up |perl -pe 's/([ ()])/\\\\$1/g'|read foo | |
end | |
if [ $foo ] | |
builtin cd $foo | |
else | |
commandline '' |
OlderNewer