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/controllers/my_controller.rb b/app/controllers/my_controller.rb
index b381fbc..b4a4aad 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -132,7 +132,7 @@ class MyController < ApplicationController
@user = User.current
layout = @user.pref[:my_page_layout] || {}
# remove if already present in a group
- %w(top left right).each {|f| (layout[f] ||= []).delete block }
+ %w(top left right bottom).each {|f| (layout[f] ||= []).delete block }
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">
@dergachev
dergachev / sass.md
Last active October 19, 2015 22:07 — forked from jorgediazgutierrez/sass.md
How SaSS and Bourbon Neat can help those websites running behind

How SaSS and Bourbon Neat can help those websites running behind

It's 2015, we are already in the "Mobile Era" and we all love how our modern sites fit and adapt to any screen. Of course, modern sites: pretty nice and flexible, stretching even to the 52 inches of a Samsung TV, High Resolution images... Its is just amazing. But you know what? We cannot forget there are almost 20 years of "non-mobile" websites out there, screaming to be upgraded. And the first word that comes out to our mind is pretty simple: "redesign".

Redesign means Higher Cost

Mobile OS manufacturers trend to improve their browsers to allow resizing, double tap zooming and dragging around, but it is just an actual usability workaround. It is like going to a disco that has mandatory night vision goggles to get in because it didn't had lighting setup when buil(weird huh?). You will end up in the floor, hating both: the goggles and the disco. You but you will still want to dance, so bye bye "Goggle Disco" and you'll go for a new one.

# Place this file in the same directory as `Vagrantfile'
# then simply require "vagrant-snapshot.rb" at the top of Vagrantfile.
require 'optparse'
Vagrant.commands.register(:snap) { Snap::Commands }
# Provide rake-like desc() 'inflected' documentation
# See http://stackoverflow.com/questions/2948328/access-attributes-methods-comments-programmatically-in-ruby
class Module

vagrant-drupal repo structure

We're exploring alternative layouts for the vagrant-drupal repo structure.

Idea 1: project sub-repo

Assuming we want to keep Vagrantfile and Berksfile in git, and assuming that we have an existing Drupal project repo, the layout will be as follows:

First create a Vagrantfile:

vagrant init precise64

Then add the following to the new Vagrantfile:

config.vm.provision :shell, :inline => <<-EOT
@dergachev
dergachev / pdf2jpg.sh
Created November 26, 2013 01:51 — forked from yura/pdf2jpg.sh
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1
@dergachev
dergachev / index.html
Created December 17, 2012 21:12 — forked from anonymous/scratchpad.js
Source code from scratchpad.io
<!DOCTYPE html>
<html lang="en">
<head>
<!-- added by alex dergachev -->
<base href="http://scratchpad.io/">
<title>Scratchpad</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body id="scratchpad" tabindex="0">