Move files from all sub-directories to current directory
On Linux or Windows (with Windows Subsystem for Linux, or Bash on Ubuntun on Windows ), if you want to move all files from all sub-directories to the current one, do this:
find ./*/ -type f -exec mv -t . '{}' +
You can then remove all those empty directories:
find ./* -type d -exec rmdir '{}' +
Blog update
These is a post on HN today about “Replacing Disqus with GitHub Comments”. I had Disqus, I forgot why it stopped working or maybe I just never enabled it in the first place. So I took this opportunity to add comment to this blog, using the method suggested in that post - Github Issues.
I also removed Swiftype search. It worked for a while th...
SSL Certificate for idn.idn domain
I got a SSL certificate for an idn.idn domain recently.
Here it is: https://你我.中国/
It might not sound like a big deal, but it actually is. It had not been possible for close to 10 years since the existense of idn.idn.
IDN stands for “internationalized domain name”, basically it allow domain names to have non-ascii characters in them. idn.idn...
Build a PC for Deep Learning
Deep learning is hot, it is all over the news, hacker news, that is.
After some research I am convinced deep learning was not just some fad, it is the real deal, I decided to build a new PC for deep learning. (But really, just an excuse I gave myself for replacing my perfectly fine 3 year old PC.)
Here is the part list:
name
bra...
Using PositiveSSL on Haproxy
I wrote about using PositiveSSL with Nginx before.
After 4 years, for Haproxy, the steps are pretty much the same, except the last one.
From the issuing email, donwload the certificate file, unzip it, we got two files:
example_com.crt and example_com.ca-bundle
For Haproxy, we need to concatenate these two file with the private key file, but t...
Use ownCloud linux command line client
I use Linux, but rarely its desktop. I mostly just use command line. OwnCloud provides a command line program: owncloudcmd. Here are the steps to set it up and use it.
First install the OwnCloud client. Go to:
https://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client
and select Linxu flavor and ...
How to download a really big file
I tried to download a really big file. It is an rar file, sized 2.5G, the uncompressed file is supposely 8G. Chorme on Windows fully downloaded file, but when I tried to uncompress it, I got “file is corrupted” error.
So I turn to Linux, using wget, it also fully downloaded the file, during dowloading, there are reconnects:
wget http://s...
Installing OpenJDK8 or Oracle jdk8
Needed to do a project in Java8, here’s how to install openjdk8:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java # select openjdk8
sudo update-alternatives --config javac # select openjdk8
sudo apt-get purge maven maven2 maven3
...
27 post articles, 4 pages.