2017年12月14日星期四

电脑性能评测

CPU Cinebench
GPU 3Dmark

http://cpu.userbenchmark.com/

2017年11月20日星期一

Ubuntu 添加 Fliqlo 屏保 并设定激活快捷键

Ubuntu 安装 Gluqlo Screensaver
命令如下

sudo apt-add-repository ppa:alexanderk23/ppa
sudo apt-get update
sudo apt-get install gluqlo
 
先删除自带的屏保  gnome-screensaver 再安装 XScreensaver
 
sudo apt-get remove gnome-screensaver
sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
 

可以通过以下命令启动

找一个叫 Gluqlo 的屏保 
 如果没有找到的话

sudo gedit ~/.xscreensaver

添加下面的语句到文件

gluqlo -root \n\

如图



保存后即可找到




 再添加屏保激活快捷键


 选中Lock screen 按 Backspace 键 让其变成 disabled




 在 Custom Shortcuts 下新建如下图


Command 里写入

xscreensaver-command -lock

再把快捷键改成 Ctrl+Alt+L


最后添加xscreensaver自启动

重启即可







2017年11月1日星期三

软件的配置文件一般方法

最基本 : INI 文件
level1.key1=value
level1.key2=value
level2.key1=value

JSON 文件
{"menu": {
  "id": "file",
  "value": "File",
  "popup": {
    "menuitem": [
      {"value": "New", "onclick": "CreateNewDoc()"},
      {"value": "Open", "onclick": "OpenDoc()"},
      {"value": "Close", "onclick": "CloseDoc()"}
    ]
  }
}}

YAML文件 
invoice: 34843
date   : 2001-01-23
bill-to: &id001
    given  : Chris
    family : Dumars

XML 文件 

2 <小纸条>
3  <收件人>大元</收件人>
4  <發件人>小張</發件人>
5  <主題>問候</主題>
6  <具體內容>早啊,飯吃了沒? </具體內容>
7 </小纸条>




2017年10月30日星期一

emacs的启动配置文件

参考文档:GNU Emacs Manual: Init File (官方说明)

Emacs启动时先查找配置文件。配置文件名通常是~/.emacs~/.emacs.el~/.emacs.d/init.el(三种文件的查找优先级见下)


在启动的时候屏蔽启动文件的方法:


emacs -q


使用别的用户的启动文件:



emacs -u&nbsp,


or


emacs --user


Emacs init文件的检索规则


优先级从高到低:
~/.emacs or .emacs.el
~/.emacs.d/init.el

2017年10月24日星期二

关于美版的 Garmin Forerunner在日本地区无法连接上iOS是的Garmin connect问题

在下用的是Garmin 的Forerunner235 美版。
iOS升级到11之后出现无法进行配对的情况。

配对时设备列表里只显示ForeAthlete。

上网调查,发现
由于Forerunner在日本被其他公司所注册,所以Garmin公司只能把在日发售的Forerunner 改名为ForeAthlete.

只要是iOS地区设定为日本的话,连接时显示设备的名称只有ForeAthlete,应该是名称对应不上,所以导致一直无法连接。

解决办法:
先把iOS地区改成美国,再进行配对,配对成功之后再改成日本即可。

我这个情况应该是少数中的少数了吧,如果有同样问题的人可以尝试一下。

2017年10月23日星期一

成功的心理技巧-Modeling:假裝你是某人,然後直到你成為某人!(Fake it until you make it)

表現得好像你可以掌握自己的人生,你就能掌握自己的人生。
—— 理查.班德勒、艾里西歐.羅伯堤、歐文.菲茲帕特里克,《NLP之父3天改變你的一生
  模仿(Modeling)他人是邁向成功的有效方法,有句英文這樣說:「Fake It until you make It.」意思是假裝你成功了、假裝你已經是某人了,或是假裝你已經達成了什麼事了,然後直到你真得做到為止, 無論是你的價值觀、你的想法,或是你的專業知識等各方面都可以;從英文上來說,這種方式叫做Modeling。
  成功做好某件事最快的方法,就是遵循以前的制度或方式,在現有成功的方法上起步,你當下便已經達成,然後再想辦法改進它,還是那句話:「Fake it until you make it.」簡單來說,就是拿現有的秘方,而且是成功的秘方,然後複製它,再改進它。
  這種成功的心理技巧,不像複製別人的設計會讓你觸犯專利,當你應用別人已經成功的技巧,複製別人的行為、模仿別人的成功模式,不會替你帶來任何麻煩,而你則會變得更好。
這是一個很有效的方式,參考你認識的人裡面最頂尖的那些人,學習他們怎麼做事,並且利用他們的方法,再從中改進,讓它成為適合自己的方法,有句諺語說:「站在巨人的肩膀上,你會看得更遠。」就是這個道理。模擬別人成功的習慣、方法、特點等等,你可以通過這種方式樹立自己的個人風格,讓自己變得獨一無二。
  事實上,你無法真得百分之百複製別人所有的事,但在模仿(Modeling)的過程當中,你可以自己改進,讓它變成對自己最好的方式,然後從此變成你獨一無二的個人風格或模式。
說得更深入具體一點,如果你想模仿成功的人,你需要模仿他們的價值觀、溝通技巧、信念、決策過程,或是面對事物的感受等等,如果你只看見別人做什麼而做什麼,這只能模仿到表面,但若你能模仿別人的心智模式,這會讓你開始像他們一樣行動。
  在許多情況下,你會發現成功的人士都有一些特點,所以可以證明,成功所必須具備的條件或特質,有些是相通的,而你可以透過模仿這些相通的特質,來幫助自己變得成功。
舉例來說,如果你表現得像是一個經驗老到的人,說起話來像是一個專家,同時,你因為必須表現成這樣而付出努力來達到這樣的效果,你最終會成為你想成為的那種人,還是那句老話:「Fake it until you make it.」
   總結來說,模仿(Modeling)是藉由模仿成功人士的特徵、特質,或習慣等等,從中改進成適合自己的方式,你不需要百分之百像別人一樣行動,你只需要建立在現有的成功方式上,來逐步改進成適合自己的方式。

2017年9月25日星期一

2017年9月5日星期二

2017年8月18日星期五

刷新Emacs的文件列表

在文件列表下按 g 来运行 revert-buffer 来刷新文件列表

2017年8月17日星期四

3 Ways to Create Wifi Hotspot in Ubuntu 14.04 (Android Support)

from : http://ubuntuhandbook.org/index.php/2014/09/3-ways-create-wifi-hotspot-ubuntu/

Dear readers, I’ve found a new way to create wireless hotspot in Ubuntu, AP mode with Android devices support, using Unity’s Network Manager.
After this tutorial, I’ve found 3 ways to create wifi hotspot in ap mode:
  1. Using Ap-hotspot, an open-source app from github: see this post.
  2. Using KDE connection editor, see the post.
  3. Using Unity’s Default Network Manager with a little hack. See below
Below I will show you how to use Unity’s default network manager to create a wireless hotspot with Android devices support, tested in 64-bit Ubuntu 1404 with Nexus 4 and Sumsung Galaxy ace3.
1. Disable WIFI and plug in an internet cable to your laptop so that your Ubuntu is connect to a wired internet and wireless is disabled.
2. Go to Network Icon on top panel -> Edit Connections …, then click the Add button in the pop-up window.

 3. Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type:



4. In next window, do:
  • Type in a connection name. The name will be used later.
  • Type in a SSID
  • Select mode: Infrastructure
  • Device MAC address: select your wireless card from drop-down menu.


5. Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password.
6. Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.


When done, click the save button.
After above steps, a configuration file created under /etc/NetworkManager/system-connections directory. File name is same to the connection name you typed in step 4.
Now press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the commands below and hit enter to edit the configuration file:

gksu gedit /etc/NetworkManager/system-connections/wifi-hotspot

Replace wifi-hotspt with the connection name you typed in step 4.
When the file opens, find out the line mode=infrastructure and change it to mode=ap. Finally save the file.

 When everything’s done, enable WIFI from Network Manager icon on the panel. It should automatically connect to the hotspot you created. If not, select “Connect to Hidden Wi-Fi Network …” and select it from the drop-down box.

 Now you can search and connect the access point from your Android mobile and enjoy!

2017年7月13日星期四

Emacs 启动 terminal

M - x shell

2017年6月9日星期五

Change Emacs font size

C-x C-+ and C-x C-- to increase or decrease the buffer text size

Change the number of workspaces use command line

To get the current values:
dconf read /org/compiz/profiles/unity/plugins/core/hsize
dconf read /org/compiz/profiles/unity/plugins/core/vsize

To set new values:
dconf write /org/compiz/profiles/unity/plugins/core/hsize 4
dconf write /org/compiz/profiles/unity/plugins/core/vsize 1

在Terminal下打开当前路径的文件夹


You can type in the terminal:
cd /home/myUser/some/long/path/to/a/directory

and then:
nautilus .

The above command will open nautilus in the folder /home/myUser/some/long/path/to/a/directory (the period is the current directory)

Or in the Terminal just type:
nautilus /home/myUser/some/long/path/to/a/directory