Public Gists by edavis10

Gravatar
Wed Nov 11 16:14:43 -0800 2009
1
2
3
diff --git a/app/models/project.rb b/app/models/project.rb
index b97d365..d4a5508 100644
--- a/app/models/project.rb
Gravatar
Wed Nov 11 12:39:45 -0800 2009
1
2
3
grouped_by_role = {}
members.each do |member|
  member.roles.each do |role|
gist: 231017 Setting the created_on field
Gravatar
Tue Nov 10 08:39:58 -0800 2009
1
2
3
issue = Issue.find(100)
issue.created_on = 10.days.ago
issue.save
Gravatar
Sun Nov 08 19:54:31 -0800 2009
1
2
3
#kill screen's startup message
startup_message off
 
gist: 227663 My Jekyll Rakefile
Gravatar
Thu Nov 05 18:50:49 -0800 2009
1
2
3
task :default => :generate
 
desc "Generate using jekyll"
gist: 227621 Pagination in Jekyll
Gravatar
Thu Nov 05 18:18:54 -0800 2009
1
2
# ....other stuff here
paginate: 10
Gravatar
Thu Nov 05 18:09:35 -0800 2009
1
2
3
  <h3 class="content">Related articles</h3>
  <ul class="related">
    {% for post in site.related_posts limit:5 %}
gist: 225753 Rails configuration for usi...
Gravatar
Tue Nov 03 19:36:25 -0800 2009
1
2
3
class SourceUser < ActiveRecord::Base
  include SecondDatabase
  set_table_name :users
Gravatar
Tue Nov 03 08:01:08 -0800 2009
1
2
3
class JournalObserver < ActiveRecord::Observer
  def after_create(journal)
    if Setting.notified_events.include?('issue_updated') ||
Gravatar
Wed Oct 28 12:32:04 -0700 2009
1
2
3
$ ls -1 vendor/plugins/
action_mailer_optional_tls
acts_as_activity_provider
Gravatar
Wed Oct 21 10:57:18 -0700 2009
1
2
3
# Edit the config file list so
[core]
        repositoryformatversion = 0
gist: 211054 Script to convert a Rails/R...
Gravatar
Thu Oct 15 09:07:56 -0700 2009
1
2
3
#!/usr/bin/env ruby
# Usage:
# ruby plugin_to_gem.rb my_plugin_directory
Gravatar
Thu Oct 08 10:14:22 -0700 2009
1
2
3
# Redmine menu that calls a JavaScript function
Redmine::MenuManager.map :project_menu do |menu|
  menu.push :javascript, { :controller => 'projects', :action => 'show' }, {:html => {:onclick => 'alert("hi"); return false;', :id => 'f'}}
Gravatar
Fri Oct 02 14:22:08 -0700 2009
1
2
3
module PatchingProjectForEirikb
  def self.included(base) # :nodoc:
    base.send(:include, InstanceMethods)
gist: 193635 Block access to .svn files
Gravatar
Fri Sep 25 08:45:04 -0700 2009
1
2
3
RewriteEngine On
 
# Important rule to prevent exposure of subversion files if you are deploying with Capistrano !
Gravatar
Fri Sep 25 08:40:32 -0700 2009
1
2
3
class DefaultAssignProjectHook < Redmine::Hook::ViewListener
 
  # context:
Gravatar
Fri Sep 18 11:16:14 -0700 2009
1
2
3
<VirtualHost *:80>
  ServerName projects.littlestreamsoftware.com
 
Gravatar
Thu Sep 10 18:59:09 -0700 2009
1
2
3
$ rake db:show_me_a_migration
(in /home/edavis/dev/redmine/redmine-core)
Found 62 Models
Gravatar
Thu Sep 10 16:37:33 -0700 2009
1
2
3
# install passenger (I like this but others will choose mongrel clusters)
 
## Temporarily disable SELinux
Gravatar
Wed Sep 09 17:25:21 -0700 2009
1
2
3
$ ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]