Another Japan in the World

Jun Aruga's blog.

IT

Bash - pushd, popd, dirs

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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.

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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.

IT

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

IT

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

IT

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

IT

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…

Read Ruby source - 3. Prepare tools: ctags

IT

Install nice tools to read C source code on Mac.This time is ctags. Install ctags is installed on Mac by default. But it is BSD version, does not have the enough feature. So, install GNU ctags by homebrew. $ which ctags /usr/bin/ctags It i…

Read Ruby source - 2. Run test

IT

Structure of test Display all the make tasks to see the test tasks. $ make help Makefile of Ruby targets: all (default): builds all of below miniruby: builds only miniruby encs: builds encodings exts: builds extensions main: builds encodin…

Read Ruby source - 1. Install Ruby from source code

IT

Install Ruby from source code I wrote the blog about reading the ruby source code 5 years ago. http://junaruga.hatenablog.com/entry/20091025/1256442339And I will try it again. Following Ruby Kaigi's presentation is my tutorial. http://ruby…

Install Scala Lint tool on Mac

IT

Install Scala Style. http://www.scalastyle.org/command-line.html $ brew install scalastyle $ which scalastyle /usr/local/bin/scalastyle $ scalastyle Foo.scala

My programming language references

IT

This week I am in Podgorica, Montenegro, where is the capital city of Montenegro.Today I would like to note my references for programming languages.This page is updated regularly.My current status for each programming languages. Active: Py…

How to install Rails4

IT

Previously on this blog, I installed Ruby 2.2. The Ruby is running on the rbenv.Upgrade Ruby from version 2.0 to 2.2 on Mac - Another Japan in the WorldAnd that is because I will install Rails4.This time, I will install Rails4.Default ruby…

Upgrade Ruby from version 2.0 to 2.2 on Mac

IT

Upgrade rbenv and ruby-build at first. $ brew update $ brew upgrade rbenv ruby-build Check available version list. And install version 2.2.3 which is latest 2.2 stable version. $ rbenv install --list $ rbenv install 2.2.3 It looks working.…

vimrc for Python development

IT

I installed flake8 command by hacking module last time to do lint for Python code. such as "perl -c".Following vimrc setting means Individual vim settings for Python file (*.py). Run $ flake8 your_python_code.py by F1 in the Vim. Run $ pyt…

Install Python lint tools on Mac

IT

Lint tools is the code format and style checker.Before I introduce one nice lint tools, I will introduce one easy way to check Python code. py_compile There is one easy way to check python code before running Python code. This comand is su…