Jun's Blog

Output, activities, memo and etc.

Info-tech

Install Ruby 2.3.3 from source on Mac

Install Ruby 2.3.3 from source on Mac. Use git to get the source. $ cd ~/git/ruby $ git pull --tags $ git checkout v2_3_3 $ autoconf $ ./configure --prefix=/usr/local/ruby-2.3.3 \ --with-openssl-dir=`brew --prefix openssl` 2>&1 \ | tee -a …

Linux Conference in Berlin

This week I have been in Berlin for Linux Confernce Europe 2016. 15 years ago I attended Linux Confernce. I was a student. But the price for the ticket was still acceptable. But now it has been changed. It is expensive for them to buy it. …

Future of Fedora

Current Technology https://fedoraproject.org/wiki/Releases Check ChangeSet about Fedora 23, 24. https://fedoraproject.org/wiki/Releases/23/ChangeSet https://fedoraproject.org/wiki/Releases/24/ChangeSet Culture See those great presentations…

Upgrading Fedora 23 to Fedora 24

Recently I upgraded Fedora 23 to 24. GUI did not work for me. But below CUI commands worked. Upgrading Fedora 23 Workstation to Fedora 24 - Fedora Magazine

Vim tips

Help :h :h command such :h gU :h text_file_name. Insert long line 80 x "=" string : 80 i = Esc Insert one indent for one range ma (scroll) >`a Convert a word to upper case, lower case. Convert the word to upper case: gUaw Convert the word …

Github: Pull-request & Rebase

Today I will take note for one tips of pull-request.For example, imagine this scenario.1. Fork from upstream repository. upstream: https://github.com/foo/bar.git forked: https://github.com/junaruga/bar.git 2. Git clone from forked own repo…

Ruby Bundler

Bundler is Ruby's gem package management tool.This time I will write a note about this tool. Install $ gem install bundle Basic $ bundle --help $ bundle help [command] $ bundle --version Help See: http://bundler.io/v1.11/man/bundle.1.html …

Gem command

Gem - It is package manager for Ruby, not to mention.Check "gem" command tightly now. Basic Help $ gem -h Display version $ gem -v 2.5.1 Update gem itself. $ gem update --system ... Display change log. ... $ gem -v 2.6.2 Environment variab…

Debugger in Ruby

ruby -rdebug It is good to use it without any additional gem. $ ruby -rdebug your_ruby.rb (rdb:1) h Debugger help v.-0.002b Commands b[reak] [file:|class:]<line|method> b[reak] [class.]<line|method> set breakpoint to some position wat[ch] <expression> set watchpoint to some ex</expression></line|method></line|method>…

Bash - pushd, popd, dirs

At first, "cd -" may be popular feature for bash's cd. "cd -" make your directory to go back to the previous directory. $ cd /tmp $ cd /etc $ pwd /etc $ cd - /tmp $ pwd /tmp So, how about pushd, popd, dirs? These are bash build-in commands…

Vim command cheat list

My Vim ManualSorry Vim. I have used you many times, for a long time. But I did not understand you deeply. Now it is time to do it. Help Basic: :help About Normal Mode: :help x About Visual Mode: :help v_u Grep: :helpgrep word File open/clo…

Install tmux

Install and use tmux which is multi window tool in the terminal.Tmux official page: tmuxEnvironment: Host OS: Mac, Guest OS: Fedora23 Install tmux Check the list of current installed dnf packages. tmux is not installed. $ dnf list installe…

sudo settings

sudo setings to use any command without password.Not to forget it.Environment: Host OS: Mac, Guest OS: Fedora 23 # visudo %your_name ALL=(ALL) NOPASSWD: ALL $ sudo your_any_command

Static Analysis Tools for Ruby on Mac

Summary Try below Ruby static analysis tools. Rubocop: Check Ruby code by Rudy Style Guide. Reek: The tool which find bad smell that may (but not necessarily do) indicate a deeper problem. Brakeman: A vulnerability scanner for Ruby and Rai…

Static Analysis Tools for C language on Mac

Try to use static analysis tools for C language on Mac, such as Perl's Perl::Critic, PHP's phpcs.Tried Clang Static Analyzer, and Splint. Clang Static Analyzer A lint tool for Mac, and UNIX platform. Install Download checker-NNN.tar.bz2 fi…

Boot processes on Fedora Linux 23

Fedora 23 is using GRUB2 as boot loader, and systemd that was replaced from SysV Init Script.Maybe because of systemd, the Linux's boot is very faster than past Fedora Linux (Fedora Core 2 or 3) that I used past time.Today I want to write …

Better gcc argument option to output all the warnings

If you want to check all the warnings about your code on gcc, I guess we should use not "-Wall" but "-Werror".See below gcc 5.3 manual. Warning Options - Using the GNU Compiler Collection (GCC) Werror Make all warnings into errors. Wall Th…

Deprecated network tools in 2009 on Linux.

I installed Fedora 23 by minimal package type. "ifconfig", "netstat", "route" commands are not included.Yes, these commands are included in net-tools package. and it was deprecated and obsolete in 2009.This document for net-tools. net-tool…

Install Fedora 23

Install Fedora Linux 23 on Virtual Box as guest OS.Select "Server" type, and download iso image of DVD. https://getfedora.org/en/server/download/Installation policy. Minimum install. CPU: Intel 64 bit Memory: 1024 MB HDD: 20 GB Setting of …

Caution when using gdb on Mac 10.9

Install GDB on Mac 10.9. $ brew install gdb Load one c compiled binary file. $ gdb bin/thread GNU gdb (GDB) 7.10.1 ... Got an error. (gdb) run Starting program: /Users/jun.aruga/git/multi_test/bin/thread Unable to find Mach task port for p…

Install memory leak check tool: valgrind to Mac 10.9

I want to use the tool to check memory leak for C program in Mac.I am using Mac OSX 10.9. There is one tool "Valgrind", it is Valgrind http://valgrind.org/ This tool is supporting Linux and Mac OS X. But OSX is for only 10.10.But I found o…

Create own RubyGem

I changed my ruby scripts to gem package. Prepare Module name is "recommendation_sample". This is used below way in Ruby code. require 'recommendation_sample' See below URL about module name. http://guides.rubygems.org/name-your-gemThe dif…

Ruby v2.3.0 new features

Watching Matz's video, check Ruby v2.3.0 new features. https://www.youtube.com/watch?v=E9bO1uqs4Oc&t=532This time, only features in the video.See all the new futures for detail. https://github.com/ruby/ruby/blob/trunk/doc/NEWS-2.3.0 did_yo…

Install Ruby v2.3.0 to check its new features

Install Ruby v2.3.0 from source Ruby source code is managed by SVN server. But this time I will use Github mirror.At first, I will do fork ruby source from original source of github to my repository of github, as I may modify it later.And …

Memo for Ruby Core developer

Memo for Ruby Core develop. Core Developer Github mirror: https://github.com/ruby/ruby Ruby Core: https://www.ruby-lang.org/en/community/ruby-core/ Wiki: https://bugs.ruby-lang.org/projects/ruby/wiki Release Engineering to know the structu…

How to synchronize your forked repository

Synchronize your repository forked from other upstream repository, with the upstream repository.For example,I forked from https://github.com/sideshowcoder/localmemcache . My forked repository is https://github.com/junaruga/localmemcache .I…

Formatting the C code by GNU indent.

If you read the source code of C language or develop in it, you may do formatting the code by your favorite indent style.I like K&R indent style, and 4 spaces as a indent, personally.For this purpose, the tool "GNU indent" is useful.In thi…

Install ErRuby on Mac

Install ErRuby which is Erlang's implementation for Ruby. The purpose is to learn the structure of Ruby implementation. MRI(Matz Ruby Implementation = CRuby) is too big to understand entire structure.Mac: 10.9.4 Ruby: 2.2.3p173 Install Ins…

Read Ruby source - 5. vim settings

Referring the C coding style of Ruby project,https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto Use TAB instead of 8 SPs in C ... au FileType c setl ts=8 sw=4 noexpandtab au FileType ruby setl nowrap tabstop=8 tw=0 sw=2 expandtab…

Read Ruby source - 4. Prepare tools: global

Install "global" to read the source code. Install Refer this install page in Japanese, to install global on Mac. http://qiita.com/5t111111/items/c14ac68f762ce71a7760 $ brew install global --with-exuberant-ctags --with-pygments ==> Download…