Link for my new blog: https://git.io/vo3
As this blog grows, things have become increasingly harder to manage.
The customizations, scripts and stylesheets are everywhere, within
and outside the source
folder. The CSS stylesheets for codeblocks
and a Solarized theme were written or installed years ago. The Gist
tag in Octopress doesn’t work as well as expected. It’s hard to see
the highlighted area. Moreover, the range
and mark
in Octopress
2’s codeblock
tag never works. As the purpose of this blog is to
remind myself about the technical details of the code, the lack of
such functionalities caused me a lot of inconveniences: while writing,
after attaching the whole chuck of code, I need to specify the line
number; while reading, after viewing the line number, I have to locate
it in lines of code. In order to highlight part of the code, I’ve
created some CSS classes (e.g. UBCli
) and put it somewhere inside
sass
folder, I spent hours for test the rules and identified the
important !
ones. This custom CSS class is fine in normal text, but
it breaks in list items <li></li>
. It’s time switch to Jekyll
plugins written by full-time developers, such as
jekyll-terminal. But then I need to install a plugin.
Will it be compatible with the existing plugins/*.rb
? Instead of
spending even much more time on code written in a language that I
don’t even understand, as a non-developer and a math student, I
can choose another popular technology which is well-developped for
posting math and program code.
The structure of an Octopress 3 blog repository is cleaner than that of Octopress 2 because Octopress 3 is a Ruby gem, which can be managed by bundle. This tool and Git work together to bring about an easier new feature test on the local repository for my blog.
What’s worse: due to the change of timezone last year, Google Webmasters has found over 70 crawl errors in this blog. Despite the Jekyll update to version 3, I couldn’t resolve this issue. I’ll manually fix each erroneous link later if I’ve time.
I tried hard migrating over 350 existing post in this blog to
Octopress 3, but it’s too hard. First, jekyll build
returned a
plethora of syntax errors caused by the change in default markdown
parser (from rdiscound to kramdown with GFM enabled). Second, some of
the posts are about technologies that I’m no longer using now, so they
aren’t worth the effort. Third, I found it extremely hard to set up
the stylesheets and the Liquid templates dispersed in several separate
folders (namely, sass/, _includes/
, _templates/
, _layouts
stylesheets
, javascripts
), so that I can have the category list
and RSS back. The sources for examples and documentations for Jekyll
Liquid tags are few. I can’t even find a way to verify the
example of the include
tag on Shopify Liquid’s documentation. The
result depends on so many factors, notably the installed version of
Ruby (runtime environment and gems) and the machine’s operating system
(for Windows, the wdm
gem is needed). The whole process requires
many commands and is certainly prone to human errors. After one
week’s fruitless attempt. Being exhausted, I realised that I need to
give up some nice features in the original blog, and move to the new
one for a more manageable framework in order to save time.
Same as some of my recent posts: get jekyll serve
working to watch
for changes during a preview of my Jekyll-bootstrap blog.
Since I found the Ruby gems setup too difficult, I switched to Ubuntu on Windows 10 after reading a Ruby setup guide.
The default display settings didn’t look great, so I installed
Ubuntu Mono font. Unluckily, one can’t type Chinese
characters, and the bottom line of tmux keeps jumping up from time
to time. Most importantly, the copy and paste function isn’t
convenient to use: every time I need to paste something, I have to
move the mouse to the top of the window, then right click and select
“Modify” → “Paste”. That’s too slow when compared to <S-Ins>
in
mintty which is shipped with Git for Windows.
However, on WLS, aptitude takes good care of package dependencies. That’s much better for installing necessary stuff for blogging with frameworks like Jekyll.
How can I run WLS using a mintty shell?
Use wsl-terminal.
Firstly, I’ve revised the use of chown
, chgrp
and chmod
, and
learnt the function of umask
.
u
, g
, o
stand for “user”, “group” and “others” respectively.r
, w
, x
can be +
or -
.chmod og-w [target-dir]
.Unfortunately, the Windows 10 bash creates folders and files with
permissions 777 and 666 respectively. The comments for
Microsoft/BashOnWindows#352 solved this problem: instead of
putting umask 022
in /etc/profile
or ~/.profile
, it should be
added in ~/.bashrc
because the login mechanism on WLS is different
from a usual GNU/Linux OS. I think the profiles aren’t process
during WLS startup after having added a simple statement for echoing a
few words in ~/.profile
. Lilred’s method is even better.
1 2 3 4 |
|
Secondly, I’ve learnt the meaning of eval
.
user@OWNER-PC:~$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-xiwtTnVlI90S/agent.6636; export SSH_AUTH_SOCK;
SSH_AGENT_PID=5764; export SSH_AGENT_PID;
echo Agent pid 5764;
user@OWNER-PC:~$ ssh-add
Could not open a connection to your authentication agent.
From user456814’s answer on a Stack Overflow question
about SSH authentication agent, we can see that ssh-agent
returns
the commands to be copied, pasted and ran in the terminal. The
command eval
saves these steps by taking the output as the command
input.
I want to include a link to a Gist in an Octopress codeblock.
In the syntax for a codeblock, the link is too long. This can cause problems in a graphical frontend of Git, such as gitk.
I found a post about GitHub URL Shortener by accident.
$ curl -i https://git.io -F "url=https://github.com/vincenttam" -F "code=vtam"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 293 100 29 100 264 40 367 --:--:-- --:--:-- --:--:-- 375HT
TP/1.1 100 Continue
HTTP/1.1 201 Created
Server: Cowboy
Connection: keep-alive
Date: Tue, 10 Jan 2017 22:50:08 GMT
Status: 201 Created
Content-Type: text/html;charset=utf-8
Location: https://git.io/vtam
Content-Length: 29
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Runtime: 0.111560
X-Node: 6a832541-d7fa-4b2b-9a4b-1e3355ad0eab
X-Revision: 4fdc60de6311e6a3aa31e19bc7b3aad7e85d33a6
Strict-Transport-Security: max-age=31536000; includeSubDomains
Via: 1.1 vegur
https://github.com/vincenttam
In fact, git.io is much simpler for users who don’t type commands.
I created three short URLs with this tool.
In the previous post in this series, I included three Vim editor commands.
As I’ve already typed hundreds of lines of source code, I feel tired
and I often make mistakes while typing those commands despite these
two command mode mappings in my ~/.vimrc
.
1 2 3 |
|
Convert these three commands into a shell script. Since I’m using
FuzzyFinder, I assume that the current working directory
(as shown by :pwd
) is the root of the local repository for the
[Octopress] blog.
1 2 3 |
|
~
after the file extension names .html
since I had
added *~
in my .gitignore
and I didn’t want these files
(including this shell script) to be tracked by Git.mklink
in cmd
.
(ran as admin) Other options are more complicated:
- Graphical programs: more disk space is consumed for programs
rarely used which have command line alternatives.
- Windows Power Shell: this method won’t work for Home
edition. (That’s my case.) I’m quite satisfied by the
current edition and I don’t see any reason to spend
a thousand dollar and a whole day to have it changed to Pro
version for functionalities that are too advanced for me.While I was writing this post, I used
grep -e "\[kramdown\]" %:h/*.markdown
in the current buffer in order to quickly retrieve the links to
websites to which I had previously referred. To escape the square
brackets and the search pattern, the flag -e
is added in between the
utility name and the pattern string. I tried using marks, but I had
forgotten the difference between a mark named with a small letter and
a capital letter.
Mark | Range |
---|---|
small | local |
capital | global |
Same as the background in my previous article.
I uninstalled Ruby 2.0 in the Control Panel, and then installed version 2.3.3 from RubyInstaller for Windows
Gem::InstallError: The 'RedCloth' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing RedCloth (4.2.9), and Bundler cannot
continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
The error message is similar to Joe’s gem install error. The only difference is that I was installing RedCloth 4.9.
This failure is due to the absence of a valid path to
RubyInstaller Development Kit. I tried manually adding the
path to the folder for binary executables (default to
C:\RubyDevKit\bin
) to PATH
, but it’s unsuccessful. I googled
“Please update your PATH to include build tools” and found
his question, whose third answer explained the function
of devkitvar.bat
. This batch script actually prepended the path of
two folders into PATH
. One is stated above; one is
C:\RubyDevKit\mingw\bin
. Running this batch file changes PATH
temporarily. A manual configuration in the Control Panel allowed
the system to detect DevKit, and this problem was thus
solved.
Name | Version Number |
---|---|
rake | 10.4.2 |
bundler | 1.13.7 |
Name | Version Number | With native extensions? |
---|---|---|
RedCloth | 4.2.9 | ✓ |
wdm | 0.1.0 | ✓ |
blankslate | 2.1.2.4 | ✗ |
chunky_png | 1.3.4 | ✗ |
coffee-script-source | 1.9.1 | ✗ |
colorator | 0.1 | ✗ |
execjs | 2.4.0 | ✗ |
fast-stemmer | 1.0.2 | ✓ |
ffi | 1.9.6 | ✗ |
hitimes | 1.2.2 | ✓ |
jekyll-gist | 1.1.0 | ✗ |
jekyll-paginate | 1.1.0 | ✗ |
jekyll-sitemap | 0.8.0 | ✗ |
kramdown | 1.6.0 | ✗ |
liquid | 2.6.2 | ✗ |
mercenary | 0.3.5 | ✗ |
multi_json | 1.11.0 | ✗ |
posix-spawn | 0.3.10 | ✓ |
rack | 1.6.0 | ✗ |
rb-fsevent | 0.9.4 | ✗ |
redcarpet | 3.2.2 | ✓ |
safe_yaml | 1.0.4 | ✗ |
sass | 3.4.13 | ✗ |
stringex | 1.4.0 | ✗ |
tilt | 1.4.1 | ✗ |
yajl-ruby | 1.2.1 | ✓ |
I put the error message from wdm in a popup dialog.
Owner@Owner-PC MINGW64 /c/github/vincenttam.github.io (source)
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 10.4.2
Using RedCloth 4.2.9
Using blankslate 2.1.2.4
Installing hitimes 1.2.2 with native extensions
Using chunky_png 1.3.4
Installing fast-stemmer 1.0.2 with native extensions
Using coffee-script-source 1.9.1
Using execjs 2.4.0
Using colorator 0.1
Using multi_json 1.11.0
Using sass 3.4.13
Using rb-fsevent 0.9.4
Using ffi 1.9.6
Using tilt 1.4.1
Using jekyll-gist 1.1.0
Using jekyll-paginate 1.1.0
Using kramdown 1.6.0
Using liquid 2.6.2
Using mercenary 0.3.5
Installing posix-spawn 0.3.10 with native extensions
Installing yajl-ruby 1.2.1 with native extensions
Installing redcarpet 3.2.2 with native extensions
Using safe_yaml 1.0.4
Using jekyll-sitemap 0.8.0
Using rack 1.6.0
Using stringex 1.4.0
Installing wdm 0.1.0 with native extensions
Using bundler 1.13.7
Installing parslet 1.5.0
Installing timers 4.0.1
Installing classifier-reborn 2.0.3
Installing coffee-script 2.3.0
Installing compass-core 1.0.3
Installing compass-import-once 1.0.5
Installing jekyll-sass-converter 1.3.0
Installing sass-globbing 1.0.0
Installing rb-inotify 0.9.5
Installing haml 4.0.6
Installing pygments.rb 0.6.2
Installing rack-protection 1.5.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.0/ext/wdm
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20170109-8020-1n4s35m.rb extconf.rb
checking for main() in -lkernel32... yes
checking for windows.h... yes
checking for ruby.h... yes
checking for HAVE_RUBY_ENCODING_H... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.0/ext/wdm
make "DESTDIR=" clean
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.0/ext/wdm
make "DESTDIR="
generating wdm_ext-x64-mingw32.def
compiling entry.c
In file included from entry.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from entry.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from entry.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from entry.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling memory.c
In file included from memory.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from memory.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from memory.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from memory.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling monitor.c
In file included from monitor.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from monitor.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from monitor.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from monitor.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling queue.c
In file included from queue.c:3:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/vadefs.h:13:0,
from
4-mingw32/include/_mingw_stdarg.h:14,
from
4-mingw32/include/stdarg.h:140,
from
c:\rubydevkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/include/stdarg.h:1,
from queue.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from queue.c:3:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from queue.c:3:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling rb_change.c
In file included from rb_change.c:4:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdlib.h:9,
from rb_change.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from rb_change.c:4:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from rb_change.c:4:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling rb_monitor.c
In file included from rb_monitor.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from rb_monitor.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from rb_monitor.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from rb_monitor.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
rb_monitor.c: In function 'rb_monitor_run_bang':
rb_monitor.c:508:9: warning: implicit declaration of function
'rb_thread_blocking_region' [-Wimplicit-function-declaration]
compiling utils.c
In file included from utils.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from utils.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from utils.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from utils.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
compiling wdm.c
In file included from wdm.c:1:0:
wdm.h:3:0: warning: "WINVER" redefined [enabled by default]
In file included from
4-mingw32/include/crtdefs.h:10:0,
from
4-mingw32/include/stdio.h:9,
from wdm.h:1,
from wdm.c:1:
4-mingw32/include/_mingw.h:248:0:
note: this is the location of the previous definition
In file included from wdm.c:1:0:
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from c:/Ruby23-x64/include/ruby-2.3.0/ruby/win32.h:41:0,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/defines.h:168,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby/ruby.h:36,
from c:/Ruby23-x64/include/ruby-2.3.0/ruby.h:33,
from wdm.h:12,
from wdm.c:1:
4-mingw32/include/winsock2.h:15:2:
warning: #warning Please include winsock2.h before windows.h [-Wcpp]
linking shared-object wdm_ext.so
rb_monitor.o: In function `rb_monitor_run_bang':
C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\wdm-0.1.0\ext\wdm/rb_monitor.c:508:
undefined reference to `rb_thread_blocking_region'
collect2.exe: error: ld returned 1 exit status
make: *** [wdm_ext.so] Error 1
make failed, exit code 2
Gem files will remain installed in
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/wdm-0.1.0 for inspection.
Results logged to
.out
An error occurred while installing wdm (0.1.0), and Bundler cannot continue.
Make sure that `gem install wdm -v '0.1.0'` succeeds before bundling.
From the line
wdm.h:4:0: warning: "_WIN32_WINNT" redefined [enabled by default]
I found wdm issue #18, but I failed to notice that the problem had been resolved. I later knew that from Jekyll issue #3721.
After changing the version number of wdm to 0.1.1, I could proceed further. The system output was fine.
Owner@Owner-PC MINGW64 /c/github/vincenttam.github.io (source)
$ gem install wdm -v '0.1.1'
Building native extensions. This could take a while...
Successfully installed wdm-0.1.1
Parsing documentation for wdm-0.1.1
Installing ri documentation for wdm-0.1.1
Done installing documentation for wdm after 0 seconds
1 gem installed
Owner@Owner-PC MINGW64 /c/github/vincenttam.github.io (source)
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 10.4.2
Using RedCloth 4.2.9
Using blankslate 2.1.2.4
Using hitimes 1.2.2
Using chunky_png 1.3.4
Using fast-stemmer 1.0.2
Using coffee-script-source 1.9.1
Using execjs 2.4.0
Using colorator 0.1
Using multi_json 1.11.0
Using sass 3.4.13
Using rb-fsevent 0.9.4
Using ffi 1.9.6
Using tilt 1.4.1
Using jekyll-gist 1.1.0
Using jekyll-paginate 1.1.0
Using kramdown 1.6.0
Using liquid 2.6.2
Using mercenary 0.3.5
Using posix-spawn 0.3.10
Using yajl-ruby 1.2.1
Using redcarpet 3.2.2
Using safe_yaml 1.0.4
Using jekyll-sitemap 0.8.0
Using rack 1.6.0
Using stringex 1.4.0
Using wdm 0.1.1 (was 0.1.0)
Using bundler 1.13.7
Using parslet 1.5.0
Using timers 4.0.1
Using classifier-reborn 2.0.3
Using coffee-script 2.3.0
Using compass-core 1.0.3
Using compass-import-once 1.0.5
Using jekyll-sass-converter 1.3.0
Using sass-globbing 1.0.0
Using rb-inotify 0.9.5
Using haml 4.0.6
Using pygments.rb 0.6.2
Using rack-protection 1.5.3
Installing toml 0.1.2
Installing celluloid 0.16.0
Installing jekyll-coffeescript 1.0.1
Installing compass 1.0.3
Installing sinatra 1.4.5
Installing listen 2.8.5
Installing jekyll-watch 1.2.1
Installing jekyll 2.5.3
Installing octopress-hooks 2.6.0
Installing octopress-date-format 2.0.2
Bundle complete! 14 Gemfile dependencies, 50 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from compass:
Compass is charityware. If you love it, please donate on our behalf at http:
//umdf.org/compass Thanks!
When I ran rake preview
, the follow line appeared.
bash: /c/Ruby23-x64/bin/rake: C:/Users/Justin/Projects/rubyinstaller/sandbox/rub
y23_mingw/bin/ruby.exe: bad interpreter: No such file or directory
I searched “rake install justin projects” on Google.
You may follow griest’s advice to have this problem
fixed. If this link were unluckily dead in the future, you might
leave a comment below after getting rid of Justin at the first line of
/c/Ruby23-x64/bin/rake
.
Octopress did work on my machine. Then I re-ran bundle install
under the local repository for my another blog, but the
same Celluloid error re-appeared. I don’t know how to
perform a celluloid downgrade to version 16.0 under that
repository. The version number for Celluloid was generated by the
system—I didn’t type it in Gemfile.lock
. As a result, I
switched to Ubuntu on Windows 10.
This Git for Windows upgrade from v2.8 to v2.11 is an
unsuccessful attempt to fix a Jekyll preview error on
my another blog triggered by the command jekyll serve
for
local preview.
After the update, I can no longer input letters with accents. Since the name of some mathematical theorems have accents, like l’Hôpital’s Rule. It would be very inconvenient if the internation keyboard can’t be used in Git Bash.
In Git Bash, locale
returns several lines. The first one says
LANG=C
. After viewing the list with locale -a
, I’ve finally
chosen the most common option with the character encoding UTF-8. To
make this change permanent for one user, add the last line into
~/.bashrc
.
1 2 |
|
Many popular URL shorteners like Bitly and Google URL Shortener won’t afftect my SEO, so I can use shortened URLs in the markdown syntax for Octopress codeblocks to save disk space.1
Do URL Shorteners Impact your SEO? by David Amerland. ↩
Mathematics learners ask questions on Mathematics Stack Exchange to get an answer from others without geographical or time restrictions, unlike teachers in schools. Users answer questions to gain virtual points called reputation.
Among them, many are new users who don’t use MathJax while typing their questions. As a result, the output is difficult to read. This discourages users from answering those questions, so we would have less answers to read. Since we can sometimes benefit from alternative solutions, it’s better to post a question that is clear enough to attract others to offer an answer. We can downvote those poorly rendered questions, but I think it’s a bit cruel to do so on the very first post from new users. Therefore, I choose to leave a comment which suggests them to use $\rm \LaTeX$. They often say they don’t know how to use it. To avoid responses like that, I include a link to the MathJax guide on Meta Math.SE.
Please use $\rm \LaTeX$.
However, it’s tedious to type the markdown source code every time I want to leave this comment.
I’ll include the code below, so that it can be simply copied and pasted next time.
1
|
|
I encountered the following math problem, so I typed in on Mathematics Stack Exchange. Then, a list of similar posts appeared.
Let $E = {1,\dots,p}$, where $p$ is a prime number. $G$ is a transitive subgroup of $S_p$, and $H$ is a nontrivial normal subgroup of $G$. Show that $H$ acts transitively on $E$.
I notice that $\lvert G \cdot x \rvert = \lvert E \rvert = p$ because $G$ acts transitively on $E$. Now, I try to show the same for $H$, but I am stuck at $\lvert H \cdot x \rvert$. May I say that for all $g \in G$, $\lvert gH \cdot x \rvert = \lvert H \cdot x \rvert$? Why can’t $H$ fix $x$?
Is it a possible duplicate of another question?
If the answer is yes, then my post is going to be quickly flagged as duplicate by experienced users on this site, especially those who are strong at abstract algebra, and I’ll lose reputation for that.
I’ve really found the same problem on Mathematics Stack Exchange by luck.
I viewed this question four days ago. When I tried to access it again tonight from my web browsing history, I found this a bit hard. Therefore, as a post on Mathematics Meta stack Exchange suggests, Vote early, vote often.
]]>After an upgrade to M$ Win* 10, I connected to my campus’ public Wi-Fi.1
I mistakenly thought that it’s the same as the one described in Windows Security popup window pops up each time any connection is made on Super User.
Googling “windows security login popup”, one will find the question “Windows Security” popup asking me to enter my login information when visiting campus website on M$ Community site. Follow the steps described in the first answer from Azam, a support engineer.
To save disk space, I don’t keep M$ IE due to M$ Edge, which was shipped with the M$ Win* 10 upgrade, and in which the security tab is absent.
To set a custom security level for Internet options without M$ IE, open the same window by clicking Control Panel → Network and Internet → Internet Options. The button “Custom level” will then appear. However, under “User authentication”, there’s no checkboxes. I only saw a group of four radio buttons.
In order to find out the right choice, I appended “custom security level” in the previous Google query. According to a similar page on SysAid, I’ve chosen “Automatic log-on with current user name and password”.
Actually, the popup window prompts for the user name and password for another Wi-Fi network with a similar name to which I’m going to connect. After typing the right user name and password, I can connect to the Internet.
Although Windows Security popup window is the main focus of this blog, I’ve learnt something quite different from it because of the article Windows 10 Settings You Should Change Right Away available on Laptop Mag found during this process. The UAC is really important: by prompting for user’s confirmation during the installation of a new software, one will be aware of the apps installed on the machine. Though many users claim that those who oppose the disablement of UAC are “misinformed”, I take the words of a preferred user who says that M$ Win* 10 would become unstable if it’s been turned off.
c.f. Jekyll Serve Error (2) ↩
I saw a question about determinants.
Suppose that $A$ and $B$ are singular and nonsingular matrices respectively. Simplify $\det((A+B)^2−(A−B)^2)$.
A wrong solution with a vote of -2 is chosen by Daniel. Why can this happen?
That’s because he’s correctly done the expansion until $\det(2AB + 2BA)$.
Having spent time on typing a comment, I worry that it will automatically disappear in sooner or later if the accepted answer is deleted. Therefore, I back it up here.
Consider However, if $A = 0$ and $B = I_3$, then the answer is clearly zero. As a result, we can’t decude further from $\det(2(AB + BA))$.
The generation of a random matrix/array of integers using
randi([imin, imax], m, n)
. For more details, you may read
GNU Octave’s manual.
Two years ago, I thought about a group of 689 elements.1 I only managed to show the existence of such a group.
Inspired by the use of Sylow III to show that a group of order 15 has only one structure: $\Z_{15} \cong \Z_3 \times \Z_5$, I wondered if $\Z_{689}$ is the only possible structure for a group of order 689.
Denote $G$ as a group of order 689. First, apply Sylow III to $\abs{G}$, whose largest prime divisor 53. Since $\lvert G \rvert$ is a product of two primes 13 and 53, we conclude that $n_{53} = 1$. Second, we have
Since $53 \equiv 1 \pmod{13}$, we have to consider two cases:
is reduced to $e_G$, implying that $H$ commute with $K$. Therefore, an internal direct product of $H$ and $K$ can be set up, and $\abs{H} \times \abs{K} = 13 \times 53 = \abs{G}$, so $G = H \times K \cong \Z_{13} \times \Z_{53}$.
$n_{13} = 53$: In this case, $G$ has 53 distinct 13-Sylows $H_1, H_2, \cdots, H_{53}$. Each of these $H_i$’s is isomorphic to the cyclic group $C_{13}$. Thus, $G$ possess $53 \times 12$ elements of order 13, 52 elements of order 53, and the identity—they add up to $\abs{G}$.
Not knowing how to continue, I finally searched for “non-abelian group of order $pq$” and found this answer on Mathematics Stack Exchange, which showed that my guess is wrong. In fact, $\Aut H \cong \Z_q^*$ and its elements are $\gamma_\lambda: h \mapsto \lambda h$. $\phi(K) = \psi(K)$ because they are both subgroup of order $p$, but it’s unique in $\Aut H$. Since homomorphisms $\phi,\psi: K \to \Aut H$ are supposed to be non-trivial, $\ker \phi, \ker \psi \ne \abs{K} = p$, so they are injective. This proves the existence of a non-abelian group $G \cong H \rtimes_\psi K$.
To conclude, even though the arguments are “too simple” for a mathematicien, a group of order 689 is never simple.
In my notes, the external semidirect product $G_1 \rtimes_\gamma G_2$ of two groups $G_1$ and $G_2$ with respect to a homomorphism $\gamma: G_2 \to \Aut G_1$, is defined as
\begin{multline} \forall\, x_1,y_1 \in G_1, \forall\, x_2,y_2 \in G_2, (x_1,x_2) \times_{G_1 \rtimes_\gamma G_2} (y_1,y_2) \\ = (x_1 \times_{G_1} \gamma(x_2)(y_1), x_2 \times_{G_2} y_2). \end{multline}
Why don’t we write $(x_1,y_1)$ and $(x_2,y_2)$ instead?
I don’t think that this question can last for a day on Mathematics Stack Exchange.
If we really do so, we’ll create a chaos of indices: we've $y_1 \in G_2$ and $x_2 \in G_1$, so we substitute $y_{\color{red}{1}}$ in $\gamma: G_{\color{red}{2}} \to \Aut G_1$ and then $x_{\color{blue}{2}}$ in $\gamma(y_1): G_{\color{blue}{1}} \to G_{\color{blue}{1}}$, which belongs to $\Aut G_{\color{blue}{1}}$.
]]>I’m recently enhancing the $\rm \LaTeX$ code for inline limits. For the reason of doing so, you may refer to the external link of my recent linklog Inline Limit Rendering.
In the previous post in this series written over one year ago, I have included a code block which enables deferred MathJax loading. However, I manually added this chuck of code in the HTML file generated by kramdown, which created the problem described in the next subsection A problem with Vim’s folding arised.
Firstly, save the code for loading MathJax in the previous
post in this series in a separate file ~/script.html
. Then
use the following commands within Vim in order to avoid leaving the
current buffer and to improve efficiency.
9,$w! ~/temp.mkd
!kramdown ~/temp.mkd > ~/temp.html
!cat ~/{temp,script}.html > ~/test.html
The digit 9
in the first command isn’t exact. Change it to any
line number that separates the yaml front matter from the
post content.
In the past, I know two ways of writing a limit using $\rm \LaTeX$.
$\lim_{x \to 1} \frac{1}{x^2}$ looks OK.
$\lim_{x \to 1} \frac{1}{x^2}$
$\displaystyle \lim_{x \to 1} \frac{1}{x^2}$ looks better, but it occupies more than one line’s vertical space.
$\displaystyle \lim_{x \to 1} \frac{1}{x^2}$
For option (1), including limits in inline equations by _
doesn’t
look good since $x \to 1$ isn’t placed at the bottom of $\lim$.
If we want the text to occupy less space to save paper, then option (2) isn’t good. In order to see another drawback of this option, I have written some long (and meaningless) sentences here, so that the fraction in this paragraph appears in the middle. Although I seldom write in English, I have tried my best to illustrate my ideas with words. The vertical space created by the fraction in display style $\displaystyle \frac{1}{x^2}$ doesn’t match with the line separation of other lines in the paragraph. If you have already reached this line but you don’t understand what I’m saying, I’m write more so as to wrap the fraction with a chuck of text.
To create an inline limit $\lim\limits_{x \to 1} \frac{1}{x^2}$ which looks better in the middle of a paragraph. Fames ac turpis egestas. Duis ultricies urna. Etiam enim urna, pharetra suscipit, varius et, congue quis, odio. Donec lobortis, elit bibendum euismod faucibus, $\lim\limits_{x \to 1} \frac{1}{x^2}$ velit nibh egestas libero, vitae pellentesque elit augue ut massa. Praesent vel ligula. Nam venenatis neque quis mauris. Proin felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam quam.
Use \lim\limits_{x \to 1} \frac{1}{x^2}
instead.
I reviewed my old post on power means inequalities.
At the 71st line of that post, I carelessly put a \|
instead of |
, causing it to be interpreted as rVert
.
As the MathJax tutorial on Math Meta SE pointed out, the
correct $\rm \LaTeX$ syntax for |
in {}
denoting a set should be
\mid
. However, the |
in {}
doesn’t match the fraction.
$$\max\left\{\frac{1}{a_i} \mid i = 1,\dots,k \right\}$$
gives
I need to change it back to
Following a comment by asmeurer, I tried
$$\max\left\{\frac{1}{a_i} \middle| i = 1,\dots,k \right\}$$
which gives
The horizontal spacing around |
isn’t correct.
$\max\left\{ \frac{1}{a_i} \,\middle|\, i = 1,\dots,k \right\} \quad \text{(right)} \\ \max\left\{\frac{1}{a_i} \middle| i = 1,\dots,k \right\} \quad \text{(wrong)}$
See the external link of this post by clicking the title of this post.
\|
as \lVert
or \rVert
.\providecommand{\norm}[1]{\lVert#1\rVert}
for denoting norms
in $\rm \LaTeX$ documents. Similar commands can be used for
absolute values and sets.Same as the previous post in this series, except that I ran this command from M$ Win* 10.
Similar to the previous post.
Owner@Owner-PC MINGW64 /c/github/blog2 (gh-pages)
$ jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
pygments.rb (~> 0.6.0)
jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/resolver.rb:35
7:in `resolve': Could not find gem 'jekyll (~> 3.1) x64-mingw32' in the gems ava
ilable on this machine. (Bundler::GemNotFound)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/r
esolver.rb:164:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/r
esolver.rb:129:in `resolve'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/d
efinition.rb:193:in `resolve'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/d
efinition.rb:132:in `specs'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/d
efinition.rb:177:in `specs_for'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/d
efinition.rb:166:in `requested_specs'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/e
nvironment.rb:18:in `requested_specs'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler/r
untime.rb:13:in `setup'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.2/lib/bundler.r
b:121:in `setup'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/plu
gin_manager.rb:37:in `require_from_bundler'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:16:
in `<top (required)>'
from C:/Ruby200-x64/bin/jekyll:23:in `load'
from C:/Ruby200-x64/bin/jekyll:23:in `<main>'
I didn’t know the reason for this problem.
Owner@Owner-PC MINGW64 /c/github/blog2 (gh-pages)
$ bundle update
DL is deprecated, please use Fiddle
Fetching source index from https://rubygems.org/
Resolving dependencies...
Could not verify the SSL certificate for
https://rubygems.org/quick/Marshal.4.8/jekyll-3.2.1.gemspec.rz.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.
Without knowing the difference between these two commands, I used the second one as an alternative to the first one.
Owner@Owner-PC MINGW64 /c/github/blog2 (gh-pages)
$ gem update
unable to convert "\x86" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth
_attributes.o, skipping
unable to convert "\x86" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth
_inline.o, skipping
unable to convert "\x86" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth
_scan.o, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth
_scan.so, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/redcloth_scan.so, skip
ping
unable to convert "\x86" from ASCII-8BIT to UTF-8 for bigdecimal.o, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for bigdecimal.so, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/hitimes/2.0/hitimes.so
, skipping
ERROR: Error installing io-console:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for rb_funcallv()... no
checking for rb_sym2str()... no
creating Makefile
make "DESTDIR="
generating console-x64-mingw32.def
compiling console.c
console.c: In function 'console_cursor_set':
console.c:716:5: warning: implicit declaration of function 'RARRAY_AREF' [-Wimpl
icit-function-declaration]
linking shared-object io/console.so
console.o: In function `console_cursor_set':
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\io-console-0.4.6/console.c:716: undefine
d reference to `RARRAY_AREF'
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\io-console-0.4.6/console.c:716: undefine
d reference to `RARRAY_AREF'
collect2.exe: error: ld returned 1 exit status
make: *** [console.so] Error 1
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-co
nsole-0.4.6 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-console-0.4.6/./gem
_make.out
invalid options: -SHN
(invalid options are ignored)
ERROR: While executing gem ... (Encoding::InvalidByteSequenceError)
"\xE9" followed by "\x94" on CP950
Updating installed gems
Updating RedCloth
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed RedCloth-4.3.2
Parsing documentation for RedCloth-4.3.2
Installing ri documentation for RedCloth-4.3.2
Installing darkfish documentation for RedCloth-4.3.2
Updating bigdecimal
Building native extensions. This could take a while...
Successfully installed bigdecimal-1.2.7
Parsing documentation for bigdecimal-1.2.7
Installing ri documentation for bigdecimal-1.2.7
Installing darkfish documentation for bigdecimal-1.2.7
Updating blankslate
Successfully installed blankslate-3.1.3
Parsing documentation for blankslate-3.1.3
Installing ri documentation for blankslate-3.1.3
Installing darkfish documentation for blankslate-3.1.3
Updating bundler
Successfully installed bundler-1.12.5
Parsing documentation for bundler-1.12.5
Installing ri documentation for bundler-1.12.5
Installing darkfish documentation for bundler-1.12.5
Updating celluloid
Successfully installed timers-4.1.1
Successfully installed celluloid-essentials-0.20.5
Successfully installed celluloid-supervision-0.20.6
Successfully installed celluloid-pool-0.20.5
Successfully installed celluloid-fsm-0.20.5
Successfully installed celluloid-extras-0.20.5
Successfully installed celluloid-0.17.3
Parsing documentation for timers-4.1.1
Installing ri documentation for timers-4.1.1
Installing darkfish documentation for timers-4.1.1
Parsing documentation for celluloid-essentials-0.20.5
Installing ri documentation for celluloid-essentials-0.20.5
Installing darkfish documentation for celluloid-essentials-0.20.5
Parsing documentation for celluloid-supervision-0.20.6
Installing ri documentation for celluloid-supervision-0.20.6
Installing darkfish documentation for celluloid-supervision-0.20.6
Parsing documentation for celluloid-pool-0.20.5
Installing ri documentation for celluloid-pool-0.20.5
Installing darkfish documentation for celluloid-pool-0.20.5
Parsing documentation for celluloid-fsm-0.20.5
Installing ri documentation for celluloid-fsm-0.20.5
Installing darkfish documentation for celluloid-fsm-0.20.5
Parsing documentation for celluloid-extras-0.20.5
Installing ri documentation for celluloid-extras-0.20.5
Installing darkfish documentation for celluloid-extras-0.20.5
Parsing documentation for celluloid-0.17.3
Installing ri documentation for celluloid-0.17.3
Installing darkfish documentation for celluloid-0.17.3
Updating chunky_png
Successfully installed chunky_png-1.3.6
Parsing documentation for chunky_png-1.3.6
Installing ri documentation for chunky_png-1.3.6
Installing darkfish documentation for chunky_png-1.3.6
Updating classifier-reborn
Successfully installed classifier-reborn-2.0.4
Parsing documentation for classifier-reborn-2.0.4
Installing ri documentation for classifier-reborn-2.0.4
Installing darkfish documentation for classifier-reborn-2.0.4
Updating coffee-script
Successfully installed coffee-script-2.4.1
Parsing documentation for coffee-script-2.4.1
Installing ri documentation for coffee-script-2.4.1
Installing darkfish documentation for coffee-script-2.4.1
Updating coffee-script-source
Successfully installed coffee-script-source-1.10.0
Parsing documentation for coffee-script-source-1.10.0
Installing ri documentation for coffee-script-source-1.10.0
Installing darkfish documentation for coffee-script-source-1.10.0
Updating colorator
Successfully installed colorator-1.1.0
Parsing documentation for colorator-1.1.0
Installing ri documentation for colorator-1.1.0
Installing darkfish documentation for colorator-1.1.0
Updating execjs
Successfully installed execjs-2.7.0
Parsing documentation for execjs-2.7.0
Installing ri documentation for execjs-2.7.0
Installing darkfish documentation for execjs-2.7.0
Updating ffi
Successfully installed ffi-1.9.14-x64-mingw32
Parsing documentation for ffi-1.9.14-x64-mingw32
Installing ri documentation for ffi-1.9.14-x64-mingw32
Installing darkfish documentation for ffi-1.9.14-x64-mingw32
Updating haml
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:
* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem
For more info see:
http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
Successfully installed haml-4.0.7
Parsing documentation for haml-4.0.7
Installing ri documentation for haml-4.0.7
Installing darkfish documentation for haml-4.0.7
Updating hitimes
Building native extensions. This could take a while...
Successfully installed hitimes-1.2.4
Parsing documentation for hitimes-1.2.4
Installing ri documentation for hitimes-1.2.4
Installing darkfish documentation for hitimes-1.2.4
Updating io-console
Building native extensions. This could take a while...
Updating jekyll
Successfully installed liquid-3.0.6
Successfully installed rouge-1.11.1
Successfully installed forwardable-extended-2.6.0
Successfully installed pathutil-0.14.0
Successfully installed jekyll-3.2.1
Successfully installed rb-inotify-0.9.7
Successfully installed listen-3.0.8
Parsing documentation for liquid-3.0.6
Installing ri documentation for liquid-3.0.6
Installing darkfish documentation for liquid-3.0.6
Parsing documentation for rouge-1.11.1
Installing ri documentation for rouge-1.11.1
Installing darkfish documentation for rouge-1.11.1
Parsing documentation for forwardable-extended-2.6.0
Installing ri documentation for forwardable-extended-2.6.0
Installing darkfish documentation for forwardable-extended-2.6.0
Parsing documentation for pathutil-0.14.0
Installing ri documentation for pathutil-0.14.0
Installing darkfish documentation for pathutil-0.14.0
Parsing documentation for jekyll-3.2.1
Installing ri documentation for jekyll-3.2.1
Installing darkfish documentation for jekyll-3.2.1
Parsing documentation for rb-inotify-0.9.7
Installing ri documentation for rb-inotify-0.9.7
Installing darkfish documentation for rb-inotify-0.9.7
Parsing documentation for listen-3.0.8
Installing ri documentation for listen-3.0.8
Installing darkfish documentation for listen-3.0.8
Updating jekyll-gist
Successfully installed multipart-post-2.0.0
Successfully installed faraday-0.9.2
Successfully installed addressable-2.4.0
Successfully installed sawyer-0.7.0
Successfully installed octokit-4.3.0
Successfully installed jekyll-gist-1.4.0
Parsing documentation for multipart-post-2.0.0
Installing ri documentation for multipart-post-2.0.0
Installing darkfish documentation for multipart-post-2.0.0
Parsing documentation for faraday-0.9.2
Installing ri documentation for faraday-0.9.2
Installing darkfish documentation for faraday-0.9.2
Parsing documentation for addressable-2.4.0
Installing ri documentation for addressable-2.4.0
Installing darkfish documentation for addressable-2.4.0
Parsing documentation for sawyer-0.7.0
Installing ri documentation for sawyer-0.7.0
Installing darkfish documentation for sawyer-0.7.0
Parsing documentation for octokit-4.3.0
Installing ri documentation for octokit-4.3.0
Installing darkfish documentation for octokit-4.3.0
Parsing documentation for jekyll-gist-1.4.0
Installing ri documentation for jekyll-gist-1.4.0
Installing darkfish documentation for jekyll-gist-1.4.0
Updating jekyll-sass-converter
Successfully installed jekyll-sass-converter-1.4.0
Parsing documentation for jekyll-sass-converter-1.4.0
Installing ri documentation for jekyll-sass-converter-1.4.0
Installing darkfish documentation for jekyll-sass-converter-1.4.0
Updating jekyll-sitemap
The preview failed.
Owner@Owner-PC MINGW64 /c/github/blog2 (gh-pages)
$ jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: C:/github/blog2/_config.yml
Source: C:/github/blog2
Destination: C:/github/blog2/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 2.227 seconds.
I, [2016-08-28T21:50:30.210479 #7440] INFO -- : Celluloid 0.17.3 is running in
BACKPORTED mode. [ http://git.io/vJf3J ]
jekyll 3.2.1 | Error: wrong number of arguments (2 for 1)
Then, I googled “unable to convert x90 from ascii-8bit to utf-8” and clicked on the first link, which was a Stack Overflow question about an similar error.
$ gem update --system
RubyGems 2.6.6 installed
Parsing documentation for rubygems-2.6.6
Installing ri documentation for rubygems-2.6.6
=== 2.6.6 / 2016-06-22
Bug fixes:
* Sort installed versions to make sure we install the latest version when
## RELEASE NOTES OMITTED
by Michal Papis.
------------------------------------------------------------------------------
RubyGems installed the following executables:
C:/Ruby200-x64/bin/gem
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
Updating rubygems-update
Successfully installed rubygems-update-2.6.6
Parsing documentation for rubygems-update-2.6.6
Installing ri documentation for rubygems-update-2.6.6
Installing darkfish documentation for rubygems-update-2.6.6
Installing RubyGems 2.6.6
RubyGems system software updated
The error unable to convert “\x86” from ASCII-8BIT to UTF-8 for … was gone, but the rests were still there.
Owner@Owner-PC MINGW64 /c/github/blog2 (gh-pages)
$ gem update
ERROR: Error installing io-console:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-console-0.4.6
C:/Ruby200-x64/bin/ruby.exe -r ./siteconf20160829-1756-1m1r5xm.rb extconf.rb
checking for rb_funcallv()... no
checking for rb_sym2str()... no
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/io-console-0.4
.6/mkmf.log
current directory: C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-console-0.4.6
make "DESTDIR=" clean
current directory: C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-console-0.4.6
make "DESTDIR="
generating console-x64-mingw32.def
compiling console.c
console.c: In function 'console_cursor_set':
console.c:716:5: warning: implicit declaration of function 'RARRAY_AREF' [-Wimpl
icit-function-declaration]
linking shared-object io/console.so
console.o: In function `console_cursor_set':
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\io-console-0.4.6/console.c:716: undefine
d reference to `RARRAY_AREF'
C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\io-console-0.4.6/console.c:716: undefine
d reference to `RARRAY_AREF'
collect2.exe: error: ld returned 1 exit status
make: *** [console.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/io-co
nsole-0.4.6 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.
0/io-console-0.4.6/gem_make.out
ERROR: While executing gem ... (Encoding::InvalidByteSequenceError)
"\xE9" followed by "\x94" on CP950
Updating installed gems
Updating io-console
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Updating jekyll-sitemap
]]>To know the page layout of a website, notably my blogs, on mobile devices before publishing it.
I used ifconfig
to check the IP address of my desktop where the
preview site was hosted. It’s 192.168.1.5
. When I typed in this
address followed by a colon and the port number 4000
, then the
browser said “connection timeout” after loading for a while.
I spent a day to identify the cause of the problem.
Actually, the website should be hosted at the internal IP address
shown by ifconfig
instead of localhost
. Since I switch off the
router before going to bed every day, the internal IP address for my
desktop changes daily. Therefore, one uses 0.0.0.0
to host the site
on all IP addresses that the machine possesses.
In Jekyll-Bootstrap, one may simply add host : 0.0.0.0
in
_config.yml
; in Octopress, one may find the line containing
server_port
in the middle of Rakefile
and add --host
#{listen_host}
.1
1 2 3 4 5 |
|
On Ubuntu, I used UFW to open the port 4000
to all devices at home.
(The netmask of my home router has 24 bits, which is the usual
setting.)
sudo ufw allow from 192.168.1.0/24 to any port 4000:4001 proto tcp
Rakefile
which allows the specification of the host address./24
in 192.168.1.0/24
means after reading
this chapter of the guide.A preview of a blog is often needed before it’s published.
However, it is possible that one doesn’t like to type localhost
in
the address bar, and would like to have other names.
The idea is in Local Setup – edit your hosts file in How to test
localhost from any device on your network
written by Wes Bos. On *nix, the file path is still the
same as on OSX, but many users would rather use Vim for editing
/etc/hosts
. One may even use sed
with the -i
flag and
the sudo
privilege in order to directly manipulate this file.
sudo sed -i "3i127.0.0.1\tblogtest.com" /etc/hosts
for insertion
of “127.0.0.1 blogtest.com” before the third line.sudo sed -i "3c127.0.0.1\tblogtest.com" /etc/hosts
for changing
the third line to “127.0.0.1 blogtest.com”.Note that the tab is escaped as \t
in these two commands.