Skip to content

Instantly share code, notes, and snippets.

@innyso
innyso / vim-golang-ide.md
Last active April 11, 2020 12:18
#vim #golang

The aim of this is to setup vim for golang development on my mac. Things that we are looking for is:

  • autocomplete especially for buildin method and variables in the same file
  • shortcut for running test and building code
  • method listing
  1. Make sure I have xcode commandline installed so that I can install the latest vim using brew in the next step without getting some sort of ruby error xcode-select --install

  2. Need to get latest vim with lua support

@innyso
innyso / calling_other_targets_with_param_in_makefile.md
Last active May 9, 2020 12:02
#makefile #calling #target #syntax

calling other targets with parameters in Makefile

build:
  docker-compose build

stop:
  docker-compose stop ${service}
  
remove:
 yes | docker-compose rm ${service}
@innyso
innyso / heredoc_dockerfile.md
Created January 25, 2017 00:49
Workaround heredoc in Dockerfile
RUN echo 'workaround:\n\
  heredoc: in dockerfile\n\
just another level of yml:\n\
  something: else\n\
  >> some_output.yml
@innyso
innyso / command_prepend_timestamp.md
Last active May 16, 2020 05:25
#linux #cmd #timestamp

Prepend timestamp to command

command | ts '[%Y-%m-%d %H:%M:%S]'
@innyso
innyso / mount_external_rw.md
Last active April 12, 2020 11:13
#cmd #osx #mount

osx mount external drive in rw

sudo mount -u -o rw /Volumes/Untitled
@innyso
innyso / kubectl_login_pod.md
Last active April 12, 2020 11:13
#k8s #cmd #pod

login to pod

kubectl exec <pod_name> -c <container_name> -i -t bash --namespace=<namespace>
@innyso
innyso / windows_service_1053.md
Last active April 12, 2020 11:11
#windows #service #error #1053

When running a windows service and you get the following:

StartService FAILED 1053:

The service did not respond to the start or control request in a timely fashion.

One of the reason might be because you cant just run any exe as a windows service. Your need to create an executable which able to communicarte with the Windows service control manager.

@innyso
innyso / nvm_prefix.md
Last active April 12, 2020 11:10
#nvm #error

when you see:

nvm is not compatible with the npm config "prefix" option

run this:

$ npm config delete prefix 
@innyso
innyso / Git_rebase_config.md
Last active April 12, 2020 11:10
#git #config
git config --global pull.rebase true
@innyso
innyso / infinity_ergodox.md
Last active April 12, 2020 11:09
#keyboard #config #ergodox

To configure ergodox infinity

  1. Download kiibohd configurator from here
  2. Change mapping and click download firmware
  3. Press flash button on both of the ergodox, the LCD should turn red to show that its in flash mode
  4. Make sure the left ergodox is connected to to usb and also the bin file reference to the left ergodox
  5. Click flash, the left ergodox LCD should change back to the default IC logo
  6. Switch USB cable to right ergodox and update the bin file to right
  7. Do the same as step 5, should get the same end result