Skip to content

Instantly share code, notes, and snippets.

@innyso
innyso / command_open_track_spotify.md
Created February 7, 2016 05:58
command to open track in spotify
sleep 1; open "spotify:track:7f0jXNMu2xjQUtmKMuWhGA#01:20"
@innyso
innyso / private_gem_server.md
Created February 8, 2016 06:21
running private gem server instruction
@innyso
innyso / redis_cache_evict_old_data.md
Last active May 9, 2020 11:59
#redis #eviction #policies #wontstart #cache

Incident and details

Redis wont startup, after some investigation we found some misconfiguration of the eviction policies.

old setting volatile-lru will only works if TTL is set from the client side

In our case client is the docker registry, therefore a better eviction policy is required for our redis

allkeys-lru would be a better candidate in this case.

@innyso
innyso / interactive_command_top.md
Last active May 9, 2020 12:00
#linux #cmd #top #options

Useful top interactive command

zxc1
@innyso
innyso / makefile_arithmetic.md
Last active May 9, 2020 12:01
#makefile #arithmetic #syntax

Arithmetic in Makfile

RESULT := $(shell echo 60*60*24*3 | bc)

result:
  @echo $(RESULT)
@innyso
innyso / check_puppet_agent_disable.md
Created March 30, 2016 04:54
Check whether puppet agent is disable or not

if puppet agent is disabled, there will be a agent_disabled.lock file in the following location

/var/lib/puppet/state/agent_disabled.lock

@innyso
innyso / command_ps_memory_leak.md
Created March 31, 2016 03:47
Command for seeing which app has memory leak

Error saying fork: Cannot allocate memory

ps --sort -rss -eo rss,pid,command | head

@innyso
innyso / dos2unix.md
Last active May 9, 2020 11:56
#windows #linux #convert #dos #unix

when using babun, after importing .vimrc there was a lot of errors with ^M. Needs to convert file from unix to dos

find ~/.vim -type f | xargs dos2unix

@innyso
innyso / block_cursor_cygwin.md
Last active April 11, 2020 12:19
#vim #windows #cygwin #babun

Block cursor for vim in cygwin/babun

Put this in .vimrc

let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
@innyso
innyso / copy_paste_babun_vim.md
Last active April 11, 2020 12:19
#vim #windows #cygwin #babun

Getting copy and paste working for vim in babun

Add this to your .vimrc so you can paste using right click on the mouse

set mouse-=a