Skip to content

Instantly share code, notes, and snippets.

@namjae
namjae / gist:d35c9ec21c7b7cf2a20fc1aca266419f
Created June 23, 2024 07:47 — forked from lixianyang/gist:3e19ff50bbae1024cebc6b6fc1103848
ubuntu snap docker run as a normal user
Create and join the docker group.
$ sudo addgroup --system docker
$ sudo adduser $USER docker
$ newgrp docker
You will also need to disable and re-enable the docker snap if you added the group while it was running.
$ sudo snap disable docker
$ sudo snap enable docker
@namjae
namjae / observer.md
Created June 18, 2024 04:39 — forked from pnc/observer.md
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@namjae
namjae / debian_from_ros_pkg.md
Created November 25, 2021 07:52 — forked from awesomebytes/debian_from_ros_pkg.md
How to create a debian from a ROS package
@namjae
namjae / listop.ss
Created June 7, 2021 11:14 — forked from vishesh/listop.ss
Some common operation on Scheme List structure
(define (delete-n list n)
(if (= n 0)
(cdr list)
(cons (car list) (delete-n (cdr list) (- n 1)))))
(define (insert-n list item n)
(if (= n 0)
(cons item list)
(cons (car list) (insert-n (cdr list) item (- n 1)))))
@namjae
namjae / logging.rkt
Created May 28, 2021 09:24 — forked from Metaxal/logging.rkt
Simple usage of Racket's logging facility
#lang racket/base
; One way to define a logger
(define lg (make-logger 'my-logger))
; Define a receiver for this logger, along with a log level
(define rc (make-log-receiver lg 'error)) ; also try with 'debug
; Another way to define a logger, with additional forms
(define-logger lg2)
(define rc2 (make-log-receiver lg2-logger 'debug))
@namjae
namjae / Emacs.kms
Created August 19, 2020 05:44 — forked from machinekoder/Emacs.kms
Emacs keys for Qt Creator
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KeyboardMappingScheme>
<!-- Written by Qt Creator 4.2.1, 2017-03-27T21:24:06. -->
<mapping>
<shortcut id="CppTools.OpenHeaderSourceInNextSplit">
<key value="Ctrl+E, F4"/>
</shortcut>
<shortcut id="CppTools.SwitchHeaderSource">
<key value="F4"/>
</shortcut>
@namjae
namjae / ubuntu1804_ruby_elixir.md
Created May 22, 2019 03:06 — forked from brycejohnston/ubuntu1804_ruby_elixir.md
Ubuntu 18.04 / 18.10 Ruby and Elixir Development Setup

Ubuntu 18.04 / 18.10 Ruby and Elixir Development Setup

Guide to setting up a new Ubuntu 18.04 dev environment with Ruby and Elixir installed with the asdf version management tool.

Update system and install prerequisite packages

Some of these packages may already be installed

sudo apt-get install make binutils gcc build-essential \
 git curl zlib1g-dev openssl libssl-dev libreadline-dev \
##
## LeoFS' Erlang
##
FROM gliderlabs/alpine:3.4
MAINTAINER LeoFS <leo-project.net/leofs/>
ENV LANG=en_US.UTF-8 \
HOME=/var/local/erlang/ \
TERM=xterm
@namjae
namjae / change-ubuntu-mirror.sh
Last active June 21, 2019 07:51 — forked from lesstif/change-ubuntu-mirror.sh
우분투의 apt 기본 미러를 다음 카카오로 변경
#!/bin/sh
##
sed -i -e 's/\(us.\)\?archive.ubuntu.com/ftp.daumkakao.com/g' -e 's/security.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list
## check
apt update
@namjae
namjae / ubuntu-ros-install.adoc
Created September 1, 2018 05:37
ROS Installation on Ubuntu
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:toc:
:toc-placement!: