<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tools on Whisperd</title><link>https://kaichaosun.github.io/tags/tools/index.xml</link><description>Recent content in Tools on Whisperd</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 30 Mar 2019 00:00:00 +0000</lastBuildDate><atom:link href="https://kaichaosun.github.io/tags/tools/index.xml" rel="self" type="application/rss+xml"/><item><title>Cheatsheet for Shell Programming</title><link>https://kaichaosun.github.io/post/shell-cheatsheet/</link><pubDate>Sat, 30 Mar 2019 00:00:00 +0000</pubDate><guid>https://kaichaosun.github.io/post/shell-cheatsheet/</guid><description>Variables NAME=&amp;#34;John&amp;#34; echo $NAME echo &amp;#34;$NAME&amp;#34; echo &amp;#34;${NAME}!&amp;#34; String NAME=&amp;#34;John&amp;#34; echo &amp;#34;Hi $NAME&amp;#34; #=&amp;gt; Hi John echo &amp;#39;Hi $NAME&amp;#39; #=&amp;gt; Hi $NAME Array Fruits=(&amp;#39;Apple&amp;#39; &amp;#39;Banana&amp;#39; &amp;#39;Orange&amp;#39;) Fruits[0]=&amp;#34;Apple&amp;#34; Fruits[1]=&amp;#34;Banana&amp;#34; Fruits[2]=&amp;#34;Orange&amp;#34; And / Or git commit &amp;amp;&amp;amp; git push git commit || echo &amp;#34;Commit failed&amp;#34; Function get_name() { echo &amp;#34;John&amp;#34; } echo &amp;#34;You are $(get_name)&amp;#34; myfunc() { echo &amp;#34;hello $1&amp;#34; } # Same as above (alternate syntax) function myfunc() { echo &amp;#34;hello $1&amp;#34; } myfunc &amp;#34;John&amp;#34; If else if [[ -z ${APP_ENV} ]]; then echo &amp;#34;The APP_ENV should be set to prod or staging, got: $0&amp;#34; exit -1 fi if [[ -z &amp;#34;$string&amp;#34; ]]; then echo &amp;#34;String is empty&amp;#34; elif [[ -n &amp;#34;$string&amp;#34; ]]; then echo &amp;#34;String is not empty&amp;#34; fi Condition [[ -z STRING ]] # Empty string [[ -n STRING ]] # Not empty string [[ STRING == STRING ]] # Equal [[ STRING !</description></item><item><title>The Tutorial of Manjaro Linux Usage</title><link>https://kaichaosun.github.io/post/master_linux_os/</link><pubDate>Sun, 03 Mar 2019 00:00:00 +0000</pubDate><guid>https://kaichaosun.github.io/post/master_linux_os/</guid><description>[TOC]
Install Manjaro Linux Burn image to usb stick: Steps:
Download mankato - GNOME here
Check the hash and compare with the hash provided on the site:
shasum ./manjaro-gnome-18.0.2-stable-x86_64.iso Burn the iso file to USB stick on Linux diskutil list sudo umount /dev/disk2s4 sudo dd if=/path/image.iso of=/dev/rdisk2s4 bs=1m On windows, use rufus with dd mode.
Bios set Insert USB stick Restart pc with F2 into bios，set secure boot to be disable，F10 save and exit Press F12 select start using USB.</description></item><item><title>Cheatsheet for Common Usage CLI</title><link>https://kaichaosun.github.io/post/common-cli-cheatsheet/</link><pubDate>Wed, 02 Jan 2019 00:00:00 +0000</pubDate><guid>https://kaichaosun.github.io/post/common-cli-cheatsheet/</guid><description>Curl Post JSON curl -i -d &amp;#39;{&amp;#34;id&amp;#34;: &amp;#34;111111&amp;#34;,&amp;#34;date&amp;#34;: &amp;#34;2018-04-27T00:00:00+10:00&amp;#34;,&amp;#34;des&amp;#34;: &amp;#34;test&amp;#34;}]&amp;#39; -H &amp;#34;Content-Type: application/json&amp;#34; -X POST https://endpoint curl -i -d &amp;#39;{&amp;#34;a&amp;#34;:&amp;#34;1&amp;#34;,&amp;#34;b&amp;#34;:&amp;#34;2&amp;#34;}&amp;#39; -H &amp;#34;Content-Type: application/json&amp;#34; -X POST https://endpoint Database MySQL SHOW VARIABLES; SELECT FROM_UNIXTIME(1510289234); SELECT NOW(); SELECT UNIX_TIMESTAMP(); MongoDB mongod --dbpath ~/data/mongodb PostgreSQL pg_dump --dbname=postgresql://user:admin@127.0.0.1:5432/database-name --table=my-table --data-only --column-inserts &amp;gt; data.sql Zip / tar zip filename.zip file1 file2 tar -czvf name-of-archive.tar.gz /path/to/directory-or-file -c: Create an archive. -z: Compress the archive with gzip. -v: Display progress in the terminal while creating the archive, also known as “verbose” mode.</description></item><item><title>使用 Hexo 搭建个人博客</title><link>https://kaichaosun.github.io/post/hexo/</link><pubDate>Wed, 04 Jan 2017 00:00:00 +0000</pubDate><guid>https://kaichaosun.github.io/post/hexo/</guid><description>Note: 已经使用Hugo创建博客。
Hexo 是一个博客框架,支持Markdown,通过命令行可以快速部署, 有大量的主题和插件,让你的blog飞起来&amp;hellip;
安装 Hexo sudo npm install -g hexo-cli hexo -v 创建 Github blog project 个人习惯将source和deploy分开,在github上创建一个blog项目(保存源文件)和 xxx.github.io项目(用于部署Github个人主页,xxx为用户名,具体参考Github Pages)
hexo init blog cd blog npm install Run server $ hexo s More info: Server
设置博客页个人信息 我的配置文件 _config.yml
# Site title: Whisperd subtitle: description: make a difference author: kaichao language: timezone: Asia/Shanghai # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' url: https://kaichaosun.</description></item></channel></rss>