set user home inside a docker container
ENV HOME /home/dev
USER dev
RUN curl -L https://get.rvm.io | bash -s stable
Related cards:
ActiveRecord union with Arel
I had to create a complex SQL query with rails that must return an ActiveRecord::Relation
After reading over Dan Shultz presentation about Arel i decided to follow the solution h...
How to restore kde klipper confirm dialog to defaults (KDE4)
I asked the same question from myself and it took some time to find a proper solution.
KDE config settings stored in ~/.share/config
and klippers' in ~/.share/config/klipperrc
In that file there is configuration group called Notifica...
Asssign Batmanjs model option to a select element
Given the following js model:
class MyApp.Post extends Batman.Model
@encode options
Given the server side json (generated with rabl):
object @post
attributes :id, :category
node(:categories) {
Category::OPTIONS...
Nicely formatted colored git log
I was struggle to set up a nicely formatted git log for a while. What I wanted to achive is to be able to quickly overlook the history including the
branch structure, authors, time of commits, remote and local branches. Here is what I currently ...
TMUX HOME END not working
I had a problem under OpenSuSE 13.1 with tmux 1.8-2.1.2 the home and end buttons did not work. It took me so long to find a solution but finally here it is, original link attached.
There is a nice tool called tput
which can display the key ...
ActiveRecord chaining multiple union with Arel
It seems chain uinon with union is possible with newer versions of Arel. But i currently stucked with 3.0.2 so this is what i come up with:
beer = Beer.arel_table
union1 = Beer.where(name: "Oberon").union(Beer.where(name: "Two Hearted"))...
Add custom nested translation path to a rails engine
In your engine's engine.rb file add these line:
module MyEngine
class MyEngine < Rails::Engine
config.before_initialize do
config.i18n.load_path += Dir["#{config.root}/conf...
Opensuse docker certificate error
You see this 2013/11/28 14:00:24 Get https://index.docker.io/v1/images/ubuntu/ancestry: x509: certificate signed by unknown authorit
You say wtf????????
Then In this file /etc/ssl/ca-bundle.pem
there is a hint: ```/usr/lib/ca-certi...
Force Launcyh to use a specific browser even if running through ssh -X
If using zeus
in that terminal issue the command below:
export BROWSER='/usr/bin/konqueror'
than in another terminal run
zeus cucumber features/holly____.feature
BROWSER will take precedence over xdg-open
and - by using...
ModuleNotFoundError: No module named 'cv2' in jupyter notebook
Create a new environment with as of now python 3.7 since opencv not available in conda's python 3.8 packages
conda create --name opencv-cuda python=3.7
conda activate opencv-cuda
conda install pytorch torchvision cudatoolkit=10.2 openc...