Skip to content

Instantly share code, notes, and snippets.

@jvmvik
jvmvik / lsf_tricks.md
Created December 14, 2018 20:31
LSF top comand

Best command

lshosts - View static resource information about hosts in the cluster

bhosts — View resource and job information about server hosts in the cluster

lsid — View the cluster name

lsclusters — View cluster status and size

@jvmvik
jvmvik / Make.md
Last active November 24, 2018 18:22
Guide for Makefile syntax

Comments can be written like this.

# File should be named Makefile and then can be run as `make <target>`.
# Otherwise we use `make -f "filename" <target>`.

Warning - only use TABS to indent in Makefiles, never spaces!

Basics

@jvmvik
jvmvik / .tmux.conf
Last active October 22, 2022 20:43
Tmux 2.5 configuration file to add a nice header at the top
# Tmux 2.5 configuration file
#
# ~/.tmux.conf
#
# Enable scrooling with the mouse
#
# e-tmux-scrolling-in-iterm2/
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
@jvmvik
jvmvik / ruby_tricks.md
Last active January 20, 2019 02:30
Ruby tricks
@jvmvik
jvmvik / performance_monitor_tooling.md
Last active October 8, 2018 14:03
List of tools to track process performance monitoring

OS realtime

  • atop : network usage
  • htop : cpu / memory / io usage
  • lsof : filesystem handle per pid

Ruby

@jvmvik
jvmvik / git_tricks.md
Last active June 24, 2022 01:33
Git tricks

Git Trick

Currated list of usefull complex command in git.

Find commmit missing on a branch in order to cherry-pick them.

Search in reverse order the hash of the commit missing on master from the dev branch.

git log origin/master..origin/dev --oneline --reverse  --pretty=format:"%h"
# copy/paste output in vscode to create a single line command like this:
git cherry-pick ef55b76d02f 1b85300d4fa a2197fe36d7 
@jvmvik
jvmvik / linux_trick.md
Last active May 11, 2021 18:48
Linux cool command tricks

Linux Trick

List files and md5 associated

md5sum * */* 2>/dev/null > md5sum.md5

Remove log files passed

grep -lr "PASSED" $WORK_DIR/*/logs/*log | xargs rm

Inline ruby execution with standard library inclusion

tmux shortcuts & cheatsheet

start new with session name:

tmux new -s master

attach to session by name:

tmux a -t myname
@jvmvik
jvmvik / irbrc
Created May 10, 2018 19:20
ruby setup / irb
# IRBRC tweaking for better productivity with Ruby 2+
# edit: ~/.irbrc
# save IRB history
require 'irb/ext/save-history'
#History configuration
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
# enable autocompletion
@jvmvik
jvmvik / README.md
Created May 5, 2018 16:09
Personal setup - new system