Another Japan in the World

Jun Aruga's blog, who lived in Japan, Singapore, live in Czech Republic. Mainly about IT and travel.

IT

Install Docker on Mac 10.9

IT

I installed Docker on my Mac. The situation is the latest Docker does not support my old Mac. But by installing Docker toolbox including Docker, I could use Docker on Mac. To install the toolbox, see this page. https://store.docker.com/edi…

Python Best Practices & Cython

IT

This is a memo for Python’s Best Practices and C extension from Python. I have heard that from my colleague. Python’s Best Practices The Hitchhiker’s Guide to Python! — The Hitchhiker's Guide to Python : So far, this site is the best. PEP …

Python, Bio Tools and me

IT

My idea Needless to say, recently bio industry’s development is remarkable. After finishing first human genome’s full sequence, the investment by governments and big company, related services. I am a fascinated person for that. I have lots…

Install RPM from source on Fedora

IT

When I used Fedora 23, I was not able to build RPM due to errors. However today when I tried to do it on Fedora 25, I was able to build and install. Great. I will note the build success day here. Install $ git clone git@github.com:rpm-soft…

Upgrade Fedora 24 to 25

IT

Yesterday I upgraded Fedora 24 to 25 reading below article that I used last time. [1] Unfortunately I have faced several issues after that. I want to take note for that here. There are some articles about Upgrading Fedora [2][3]. Later I w…

Install Python 2.7.13 from source on Mac

IT

Continuing from previous article. $ cd ~/hg/cpython Check latest version in v2.x. v2.7.13 is latest version for that. $ hg tags | grep 'v2\.7' Below command hg update -r something is like a git checkout something. $ hg update -r v2.7.13 31…

Download cpytyon with Mercurial

IT

I wanted to compile python from source code, reading a document[1]. However I was failed to do it last time. [2] hg clone was failed because of the issue. It may be because of my PC’s poor memory environment. $ hg clone https://hg.python.o…

Mercurial training

IT

I started to use Mercurial that is another source code management (SCM) tool such as Git. Nowadays there are many SCM tools, such as CVS, SVN, VSS, Git, Mercurial. CVS, SVN, and VSS is central repository management tool. Those are already …

Git Tips

IT

I will summarize tips that I learned after reading a Git book. git describe Show the most recent tag that is reachable from a commit For example, we know a commit hash that a bug was fixed. And we can find fixed version base on the commit …

Think about the Python environment like Ruby Bundler

IT

Want to use Python environment like Ruby Bundler! Ruby Bundler is very convenient. Below process is so common before starting development for a RugyGem package. $ git clone GIT_URL/foo.git $ cd foo $ bundle install --path vendor/bundle $ b…

Install Python 3.5.2 from source on Mac

IT

Python Install latest stable version Python 3.5.2 on Mac. Seeing official site [1]. However as I was not able to download with Mercurial (hg command), that is on the official site, get the source from git mirror. [2] Install from Git sourc…

Install Ruby 2.3.3 from source on Mac

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

IT

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

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…