Skip to content

Instantly share code, notes, and snippets.

View MischaTheEvil's full-sized avatar

Mischa The Evil MischaTheEvil

View GitHub Profile
@MischaTheEvil
MischaTheEvil / gist:fc6e4847fbafd6717e6e
Last active August 29, 2015 14:09
rvm/rvm#3144: annotated, command-only summary of the full session
============
Part one:
============
root@ubuntu:~# cd /var/www/
root@ubuntu:/var/www# type rvm | head -1
root@ubuntu:/var/www# rvm debug
# (default) gemset in use by default
root@ubuntu:/var/www# rvm gemset list
root@ubuntu:/var/www# cd redmine-master.local.lan/
# redmine_master gemset selected by using .ruby-gemset file
@MischaTheEvil
MischaTheEvil / gist:199bb8601ca96d443d5c
Last active August 29, 2015 14:09
rvm/rvm#3144: full session log which displays the unexpected behavior
============
Part one:
============
root@ubuntu:~# cd /var/www/
root@ubuntu:/var/www# type rvm | head -1
rvm is a function
root@ubuntu:/var/www# rvm debug
ruby-2.1.5:
@MischaTheEvil
MischaTheEvil / std_inst_var_in_view
Created September 23, 2014 04:27
Standard instance variables in Rails view(s)
<h1>Debug Info</h1>
<h2>assigns</h2>
<div>
<%= debug(assigns) %>
</div>
<h2>base_path</h2>
<div>
<%#= debug(base_path) %>
</div>
<h2>controller</h2>
@MischaTheEvil
MischaTheEvil / development_profiler.rb
Last active December 31, 2015 03:59 — forked from hiltmon/development_profiler.rb
A helper class to support easy ruby-prof profiling in Rails applications.
# encoding: utf-8
#
# Copyright (c) 2012 Hilton Lipschitz
# Copyright (c) 2013 Mischa The Evil
#
# 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 of the Software, and to
@MischaTheEvil
MischaTheEvil / BitNami Tracks Stack Upgrade to Tracks 1.7.1.diff
Created September 9, 2010 02:54
Patch to update Tracks to 1.7.1 in current BitNami Stack
Index: app/controllers/data_controller.rb
===================================================================
--- app/controllers/data_controller.rb (revision 0)
+++ app/controllers/data_controller.rb (working copy)
@@ -18,25 +18,27 @@
def yaml_export
all_tables = {}
- all_tables['todos'] = current_user.todos.find(:all)
+ all_tables['todos'] = current_user.todos.find(:all, :include => [:tags])
===
To GitHub
===
[mischa@server redmine_collapse]# git remote add origin git@github.com:MischaTheEvil/redmine_collapse.git
[mischa@server redmine_collapse]# git push origin --all
Counting objects: 520, done.
Compressing objects: 100% (452/452), done.
Writing objects: 100% (520/520), 74.55 KiB, done.
Total 520 (delta 315), reused 0 (delta 0)
To git@github.com:MischaTheEvil/redmine_collapse.git
@MischaTheEvil
MischaTheEvil / gist:265068
Created December 29, 2009 01:02
0.9-decision_blockers
FEEDBACK?:
http://www.redmine.org/issues/1157#note-15
http://www.redmine.org/issues/4277#note-5
http://www.redmine.org/issues/2755
http://www.redmine.org/issues/3359
CAN BE CLOSED?:
Davide Zipeto wrote:
> Is is possible jsut to write the < pre> tag on a line by disabling temporarly the textile markup engine ? I cannot find any tricks with that...
A neat trick (AFAIK not officially supported by Redmine (nor RedCloth)) can be the use of Redmine's inline code markup.
With a nifty syntax the following results can be achieved: <@pre@>, [@[links]@], <@/code@>, <@/pre@>, <@code@>, @h1.@ and @_italic_@.
I've posted the source of this reply to a gist to easily show the syntax I've used for the examples: <PasteGistURL>.
&nbsp;
REDMINE VERSION SHARING TESTS
Redmine trunk@3129
Role: Manager (which has version-management permission) on ALL projects
* Version TST, not shared, in project: "parent2" "child2-1" "nested2-1-1"