I’ve found RVM’s gemsets are no longer useful to me. I used to make a separate gemset for each project by placing
.ruby-gemsetfile in each project directory. But whenever a Ruby release come out, I repeated uninstalling previous version and then clean installing new version. So I decided to move to chruby, smaller and simpler one.
Also if you have additional script lines loading RVM, remove them. I left them to make it work only if RVM is installed.
[[ -s "$HOME/.rvm/scripts/rvm/" ]] && source "$HOME/.rvm/scripts/rvm"
ruby-install handles installations of various Rubies.
If you’re on OS X:
brew install ruby-install
If you’re on Arch Linux:
yaourt -S ruby-install
wget -O ruby-install-0.6.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz tar -xzvf ruby-install-0.6.0.tar.gz cd ruby-install-0.6.0/ sudo make install
If you’re on OS X:
brew install chruby
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz tar -xzvf chruby-0.3.9.tar.gz cd chruby-0.3.9/ sudo make install
Then all I need to do is to load it from startup script,
if [ -e /usr/local/share/chruby/chruby.sh ]; then source /usr/local/share/chruby/chruby.sh source /usr/local/share/chruby/auto.sh fi
auto.shis for auto-switching the current version of Ruby according to
.ruby-versionfile of the current directory. This is optional.
chruby provides ways to migrate Rubies from another Ruby manager, but I started from scratch, so installed latest Ruby using ruby-install.
ruby-install ruby 2.3.0
which rubywill points to some path under
which ruby ~/.rubies/ruby-2.3.0/bin/ruby
Now it’s possible to auto-switch the Ruby version with
.ruby-versionfile or manually with chruby commands like
chruby system, etc.
Please install this on your new android phone, enter pass code and get the flag.
- Updated the libdroid.apk, this one is now also able to run on a device. No changes to internal logic.
If the above link doesn’t work, please use this link.
At the very first, I haven’t think about the timezone of my blog. I had used to generate my blog on my local machine and deploy manually. At that time every content is released based on KST timezone, which is GMT+9.
Right after that I tried to deploy my blog through Travis CI, I realized that something went wrong. Travis CI uses UTC by default, so the URL of every post between 0AM and 9AM was shifted by one day backward. I had to modify
/etc/timezoneor set environment variable
TZto restore the URLs.
Yes, this can solve the problem I faced. But should I really use the KST for this whole blog? It’ll be nice if I can show the time based on timezone of each client, but I won’t be able to handle the date part of the post URL as well. So I decided to move the timezone of this site to UTC, global standard at least.
On the previous day, I accidently removed
/tmp/tmux-1000/directory. At first, there seems no problem with Tmux. But when I created another SSH connection, I saw this error message:
$ tmux attach no sessions $ tmux list-sessions failed to connect to server
But the Tmux prosesses were still there:
$ ps -ef | grep tmux 59277 16305 0 May06 pts/0 00:00:00 tmux attach
Then I immediately noticed that the removing
/tmp/tmux-1000/things made the problem. And thankfully Tmux provides workaround. From the
tmux stores the server socket in a directory under /tmp (or TMPDIR if set); the default socket is named default. This option allows a different socket name to be specified, allowing several independent tmux servers to be run. Unlike -S a full path is not necessary: the sockets are all created in the same directory.
If the socket is accidentally removed, the SIGUSR1 signal may be sent to the tmux server process to recreate it.
Now we can revive our Tmux sessions by sending a signal to recreate sockets:
killall -s SIGUSR1 tmux
More simply, since the number of
killall -10 tmux
Then we can do
tmux attachsuccessfully. Yay!
Pinpoint is an open source APM (Application Performance Management) tool for large-scale distributed systems written in Java.
First things first, install Docker.
wget -qO- https://get.docker.com/ | sh
You can verify
dockeris installed correctly.
sudo docker run hello-world
For more details, see the installation guides of Docker.
Look into the Dockerfile
In fact, I already made a Dockerfile for Pinpoint. You can see on yous/pinpoint-docker. From now on, I’ll describe the Dockerfile line by line.