Skip to content

Instantly share code, notes, and snippets.

@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 / interactive_command_top.md
Last active May 9, 2020 12:00
#linux #cmd #top #options

Useful top interactive command

zxc1
@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 / private_gem_server.md
Created February 8, 2016 06:21
running private gem server instruction
@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 / setting_up_ssh_keys.md
Last active May 9, 2020 11:52
#ssh #setup #config

This is something that I do all the time but I always get it wrong....

  • Navigate to ~/.ssh/

  • Run below command and follow the prompt

ssh-keygen -t rsa
  • Make sure the permission are as follow
@innyso
innyso / splunk_config_table.md
Created January 29, 2016 00:52
Useful table for splunk configuration
@innyso
innyso / escape_percentage_hiera.md
Last active May 16, 2020 05:29
#hiera #escape #percentage

In hiera, when encounter a percentage symbol, it will try to interpolate it. In order to stop it from happening, make sure you quote the value

TIME_FORMAT: '%d/%m/%Y %H:%M:%S'
@innyso
innyso / yum_show_all_version.md
Last active May 9, 2020 12:02
#linux #yum #package #show #versions

Get all version for a particular package in yum

yum --showduplicates list <package name> | expand
@innyso
innyso / ruby_object_methods.md
Created January 5, 2016 05:55
print method for ruby object
object_name.methods
object_name.inspect