Skip to content

Instantly share code, notes, and snippets.

View dergachev's full-sized avatar

Alex Dergachev dergachev

View GitHub Profile
diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
index cfe0288..b8fffa0 100644
--- a/app/views/issues/show.rhtml
+++ b/app/views/issues/show.rhtml
@@ -25,11 +25,29 @@
<th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
</tr>
<tr>
- <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
+ <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to">

BabelFrog, and Writing Chrome Extensions

About BabelFrog

  • Demo
  • Why I wrote it
@dergachev
dergachev / redmine_repository_fetch.rb
Created December 3, 2014 22:59
Initial draft for redmine_git_remote, deprecated; see https://github.com/dergachev/redmine_git_remote
# initial draft for redmine_git_remote, deprecated
module RepositoryFetch
def self.logger
::Rails.logger
end
PATTERNS = [
{ :pattern => "/redmine_git_fetch/github.com/",
:uri_prefix => "git@github.com:",
@dergachev
dergachev / evolvingweb-1080.yml
Created December 9, 2014 19:36
sitediff-config for evolvingweb
before_url: http://evolvingweb.ca
after_url: http://docker-host.tree.ewdev.ca:5027
paths:
- /
- /user
- /about-evolvingweb
- /contact-us
- /training
- /blog
---
after:
url: https://gist.github.com/dergachev/a3cf9fe176b1a0b949cf
sanitization:
- title: Strip domain names from absolute URLs
pattern: http:\/\/[a-zA-Z0-9.:-]+
substitute: __domain__
disabled: true
paths:
- /
<?php
function my_module_menu() {
$items = array();
$items['admin/config/content/my-module'] = array(
'title' => 'My Module Settings',
'description' => 'Administer My Module.',
'page callback' => 'my_module_settings_callback',
'access callback' => 'user_access', //this is filled in by default
'access arguments' => array('access administration pages'), //arguments to user_access
);
<?php
$result = db_query(
"SELECT nid, type, title, uid, created FROM {node}
ORDER BY created DESC LIMIT 10");
<?php
function my_module_menu() {
$items = array();
$items['node/%node/my-module'] = array(
'title' => 'Notes',
'description' => 'Notes for each Node',
'page callback' => 'my_module_node_notes',
'page arguments' => array(1),
'access callback' => 'node_access',