Fix Screen Brightness Issue with ThinkPad X1 Carbon 3rd Edition
I recently installed Ubuntu 14.04.3 LTS on my Thinkpad X1 carbon (3rd Edition). Most of the stuff worked out of the box, yet the screen brightness adjustment key has no effect.
more ...I recently installed Ubuntu 14.04.3 LTS on my Thinkpad X1 carbon (3rd Edition). Most of the stuff worked out of the box, yet the screen brightness adjustment key has no effect.
more ...Recently I installed Plex Media Server on my Ubuntu box. Here are what I did to make it run as my user so that it can index any of my media files without permission issues. The instructions here is for Ubuntu 14.04, but should be applicable to later Ubuntu version as well.
more ...I used to be able to change the MAC address of WAN interface by specifying
macaddr option in /etc/config/network. However, due to unknown reason,
this no longer works in snapshot builds. Here is how to achieve the same effect
using init scripts.
Here are the steps and caveats to setup a proper mail list on Ubuntu server. The instructions are are for Ubuntu 14.04 LTS, and should be easy to adapt for other platforms.
more ...I use Octopress to manage my blogs, which rely on correct ruby gem version to
work. Although Octopress use Bundler to manage the gem dependencies, sometimes a
simple bundle install does not work out of box. Since everything works fine on
one of my machines, I decided to replicate the exact ruby/gem setup of that
machine.
Recently I need to install Adobe Acrobat Reader on couple of my Ubuntu boxes. The process is full of black magic that sometimes you can't find the documents anywhere. Hopefully this post will make the process less a pain.
more ...stdint.h provides various machine-independent integer types that are very
handy to use, especially the uint64_t family. You would assume it's something
like long long unsigned int and tempted to use %llu in printf, which, however, will be
reported as a warning by any decent compiler.
warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' [-Wformat]
In Chapter 5.5, there is one step that fixes the GCC's stack protection detection problem. The command is:
sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
Now that we can take advantage of rsync to minimize the data to transfer when backup. But it's still a little uncomfortable if we need to do this manually everyday, right? Well, cron is here to solve the pain.
more ...Recently I do most of my work on a remote data center through a slow network
connection (<100KB/sec). I usually backup my project source tree as follows.
I first do make clean and also delete any unnecessary obj files to shrink the
total file size, then I compress the whole source tree as a tar ball and then I
use scp locally to fetch the backup tar ball to my local machine. The procedure
is quite boring since I need to do this every day before I go home, otherwise
the whole bandwidth will be occupied for near an hour during which I can almost
do nothing.
Situation gets better when I find rsync and cron. Here is how I do automatic
regular (daily) backup with them.
Now I have the script that monitoring the output of several UART devices:
more ...I'd like to watch the output of a UART device in Linux, and I only want to see the content when there are a whole line. So I prefer some kind of line-buffered cat such as:
more ...Suppose you have two machines: A and B. A is your work machine, you do most of your work on it. But B is a little special (e.g., connected to some specific hardware) that you need to ssh on it or copy some file from A to B from time to time. Here is the way that you can get rid of entering passwords every time you do ssh/scp.
more ...Alias is a very useful feature of shell (e.g. bash). For example, I have this
line in my .bashrc:
alias ll="ls -alF | more"