User Tools

Site Tools


perso:dump:mess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
perso:dump:mess [2010/10/06 17:20]
127.0.0.1 (old revision restored)
perso:dump:mess [2017/03/19 23:13] (current)
Jean-Christophe Berthon Add section regarding adding trusted Certificate Authority to Synology DSM
Line 1: Line 1:
-====== ​big mess ======+====== ​Just a big mess of commands and tricks ​====== 
 + 
 +===== Time Machine like backup ===== 
 +Source information:​ [[http://​blog.interlinked.org/​tutorials/​rsync_time_machine.html|Time Machine for every UNIX out there]] and the rsync(1) man page. 
 + 
 +I intend to have a powerful back-up solution for my Linux computers and also my work laptop (Windows). The backup will be done on my Synology NAS using rsync. This is here just a few notes in order to put this in place. 
 + 
 +I still have to test that one. There is no guarantee that this is working, backing up something or preserving your data. Use at your own risk! 
 +<​code>​rsync -zaxPAX --checksum --hard-links \ 
 +  --rsync-path="​rsync --fake-user"​ --sparse \ 
 +  --delete-excluded \ 
 +  --exclude-from=$HOME/​.rsync/​exclude \ 
 +  --link-dest=../​current \ 
 +  $HOME user@backupserver:​Backups/​incomplete_back-$date</​code>​ 
 + 
 + 
 +===== A big mess =====
 Things I want to store (like a brain extension), but that fits in no particular place... Things I want to store (like a brain extension), but that fits in no particular place...
  
  
-===== Hardware information on Linux =====+==== Hardware information on Linux ====
 Albeit not as graphical as the Windows counterpart CPU-Z, the following command is rich in information about your hardware: Albeit not as graphical as the Windows counterpart CPU-Z, the following command is rich in information about your hardware:
 <​code>​$ sudo dmidecode -d /dev/mem | less</​code>​ <​code>​$ sudo dmidecode -d /dev/mem | less</​code>​
  
  
-===== Bash tips and tricks ​=====+==== Bash tips and tricks ====
 If you want to have a simple off-the-record configuration so that you can type in commands that are not stored in the history, you can use this trick: If you want to have a simple off-the-record configuration so that you can type in commands that are not stored in the history, you can use this trick:
 <​code>​$ export HISTIGNORE="​[ \t]*"</​code>​ <​code>​$ export HISTIGNORE="​[ \t]*"</​code>​
Line 14: Line 30:
  
  
-===== Setting your system to have weeks starting on Mondays ​=====+==== Setting your system to have weeks starting on Mondays ====
 If you are using the default American English language in Ubuntu, then many of the applications in Gnome are also configured for American style date/​calendar with weeks starting on Sundays. To change that, you can do the following: If you are using the default American English language in Ubuntu, then many of the applications in Gnome are also configured for American style date/​calendar with weeks starting on Sundays. To change that, you can do the following:
  
Line 42: Line 58:
  
  
-===== WordPress tips and tricks ​=====+==== WordPress tips and tricks ====
 If you do not like that when you upload transparent PNG to WordPress admin area and have a black background where you had a transparent area in the generated thumbnail, you might want to look at this: If you do not like that when you upload transparent PNG to WordPress admin area and have a black background where you had a transparent area in the generated thumbnail, you might want to look at this:
  
Line 56: Line 72:
 </​code>​ </​code>​
  
-===== Font / Police ​=====+ 
 +==== Changing the keyboard in Ubuntu console mode ==== 
 + 
 +You just have to update the files /​etc/​default/​keyboard (when loging in) and /​etc/​default/​console-setup (during boot) 
 + 
 +For American English QWERTY, choose: 
 + 
 +<​code>​XKBMODEL="​pc104"​ 
 +XKBLAYOUT="​us"</​code>​ 
 + 
 +For French (AZERTY) or German (QWERTZ): 
 + 
 +<​code>​XKBMODEL="​pc105"​ 
 +XKBLAYOUT="​fr"</​code>​ 
 + 
 +<​code>​XKBMODEL="​pc105"​ 
 +XKBLAYOUT="​de"</​code>​ 
 + 
 +==== Cryptkeeper on Ubuntu 12.04 ==== 
 + 
 +Cryptkeeper does not launch on Ubuntu 12.04. To make it work, just execute the following command: 
 + 
 +<​code>​gsettings set com.canonical.Unity.Panel systray-whitelist "​['​JavaEmbeddedFrame',​ '​Wine',​ '​Update-notifier',​ '​cryptkeeper'​]"</​code>​ 
 + 
 +==== Mirroring a folder over a network (rsync/SSH) ===== 
 + 
 +This assume that ssh is correctly set-up and that the destination folder exist. 
 + 
 +<​code>​rsync -acAHX --progress --del /​var/​backup/​ myNAS.lan:/​var/​backup/​$(hostname)</​code>​ 
 + 
 +//Note: the --del option will remove the locally deleted files on the remote end. In my case, this is a must. But in most cases you should remove that option!// 
 + 
 +==== Font / Police ====
 font-family:​Georgia,​Lucida Bright,​Times New Roman,​serif;​ font-family:​Georgia,​Lucida Bright,​Times New Roman,​serif;​
  
 New proposed CSS: [[new CSS root]], [[new CSS wiki]] New proposed CSS: [[new CSS root]], [[new CSS wiki]]
  
-==== Better font in Opera on Linux ====+=== Better font in Opera on Linux ===
 Apply to Opera 9.64 and previous versions. Apply to Opera 9.64 and previous versions.
  
Line 68: Line 116:
 Under User Prefs, disable (uncheck) the preference about ''​Enable Core X Font''​ and click the Save button (at the end of the 'User Prefs' section). Under User Prefs, disable (uncheck) the preference about ''​Enable Core X Font''​ and click the Save button (at the end of the 'User Prefs' section).
  
- +=== See also ===
-==== See also ====+
   * http://​en.wikipedia.org/​wiki/​Typeface   * http://​en.wikipedia.org/​wiki/​Typeface
   * http://​en.wikipedia.org/​wiki/​Category:​Serif_typefaces   * http://​en.wikipedia.org/​wiki/​Category:​Serif_typefaces
Line 75: Line 122:
   * http://​www.baekdal.com/​articles/​Usability/​new-minimum-font-size   * http://​www.baekdal.com/​articles/​Usability/​new-minimum-font-size
  
-===== Screen resolution of my computers ===== +==== Allowing secure download via HTTPS with wget on Ubuntu Server Edition ====
-  * L0514: 285x215mm => 91,​3x90,​78dpi or **~91dpi** +
-  * Thorsmork (Siemens LCD): 377x303mm => 86,​25x85,​83dpi or **~86dpi** +
- +
-===== Allowing secure download via HTTPS with wget on Ubuntu Server Edition ​=====+
 Using Ubuntu Server Edition, no "root certificates"​ are installed thus downloading a page like https://​wiki.ubuntu.com/​Huygens is not allowed with wget. Instead of taking the unsafe path to ignore the warning that wget emits, I took the other way which includes installing root certificates that Ubuntu trust (and I trust them... one of my weak points ;-)). So you basically juts have to execute: Using Ubuntu Server Edition, no "root certificates"​ are installed thus downloading a page like https://​wiki.ubuntu.com/​Huygens is not allowed with wget. Instead of taking the unsafe path to ignore the warning that wget emits, I took the other way which includes installing root certificates that Ubuntu trust (and I trust them... one of my weak points ;-)). So you basically juts have to execute:
 <​code>​$ sudo apt-get install ca-certificates</​code>​ <​code>​$ sudo apt-get install ca-certificates</​code>​
  
-===== Viewing films on Linux =====+==== Viewing films on Linux ====
 In Europe, numbers cannot be copyrighted nor can someone try to stop spreading them. So here is the lucky number that might help you watch films on Linux:\\ In Europe, numbers cannot be copyrighted nor can someone try to stop spreading them. So here is the lucky number that might help you watch films on Linux:\\
 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Line 89: Line 132:
 In case, you do not understand it ;-) if you have bought an HD-DVD and want to watch it on your computer, you will need this number! It might even give you some more freedom... Check for more information here: [[http://​rudd-o.com/​archives/​2007/​04/​30/​spread-this-number/​|Spread this number]] In case, you do not understand it ;-) if you have bought an HD-DVD and want to watch it on your computer, you will need this number! It might even give you some more freedom... Check for more information here: [[http://​rudd-o.com/​archives/​2007/​04/​30/​spread-this-number/​|Spread this number]]
  
-===== Miscellaneous ​=====+==== Miscellaneous ====
 [[perso:​dump:​mess:​checkSystem]] [[perso:​dump:​mess:​checkSystem]]
  
-===== Repository for Red Hat EL 5.3 or CentOS 5.3 =====+==== Repository for Red Hat EL 5.3 or CentOS 5.3 ====
 <​code>​[atrpms] <​code>​[atrpms]
 name=EL $releasever - $basearch - ATrpms name=EL $releasever - $basearch - ATrpms
Line 102: Line 145:
 includepkgs=*nvidia-graphics*</​code>​ includepkgs=*nvidia-graphics*</​code>​
  
-===== Firefox settings optimisation (faster start-up) ​=====+==== Add a new Certificate Authority in the list of trusted ones on Synology DSM 6.1 ==== 
 + 
 +In order to add a new root certificate (e.g. for an internal CA), you need to do the following assuming your root public certificate is in the file ''​my-ca-root.pem''​. The file suffixes ''​.pem''​ or ''​.crt''​ are interchangeable,​ but in our case make sure to use the right suffix depending on the location as per our example: 
 + 
 +<​code>​$ sudo cp my-ca-root.pem /​usr/​share/​ca-certificates/​mozilla/​my-ca-root-pem 
 +$ sudo chmod 0644 /​usr/​share/​ca-certificates/​mozilla/​my-ca-root.prm 
 +$ sudo ln -s /​usr/​share/​ca-certificates/​mozilla/​my-ca-root-pem /​etc/​ssl/​certs/​my-ca-root.crt 
 +$ cd /​etc/​ssl/​certs 
 +$ sudo ln -s my-ca-root.crt $(sudo openssl x509 -hash -noout -in my-ca-root.crt).0 
 +$ sudo cat my-ca-root.crt | sudo tee -a ca-certificates.crt</​code>​ 
 + 
 +Source: https://​forum.synology.com/​enu/​viewtopic.php?​t=93223 
 + 
 +However the source was adapted, but it works on DSM 6.1. 
 + 
 +==== Firefox settings optimisation (faster start-up) ====
 Since Firefox 3, many settings (bookmarks, history, etc.) are store into small database files (the ones with the sqlite extension). But after a long utilisation of Firefox, these files get big (and thus slowdown their reading) and their inner data gets sort of fragmented. Now, there is a rather not too difficult way of optimising those files. All you need is sqlite3 program and a small script to do the job. Since Firefox 3, many settings (bookmarks, history, etc.) are store into small database files (the ones with the sqlite extension). But after a long utilisation of Firefox, these files get big (and thus slowdown their reading) and their inner data gets sort of fragmented. Now, there is a rather not too difficult way of optimising those files. All you need is sqlite3 program and a small script to do the job.
  
 +//**Update 2016-09**: I would have to verify to be sure, but I think Firefox must be doing those sqlite databse maintenance from time to time (or sqlite is automatically doing now) because since a few years now this trick does not bring any visible changes.//
  
-==== Optimisation for Mac OS X  ​====+ 
 +=== Optimisation for Mac OS X  ===
  
 The following script is for Mac OS X users and is based on a script for Linux that I have found in the [[http://​ubuntuforums.org/​showthread.php?​t=1088094|Ubuntu Forums - Firefox speedup(...)]]. Linux users should refer to the Ubuntu Forums link or to the next chapter. The following script is for Mac OS X users and is based on a script for Linux that I have found in the [[http://​ubuntuforums.org/​showthread.php?​t=1088094|Ubuntu Forums - Firefox speedup(...)]]. Linux users should refer to the Ubuntu Forums link or to the next chapter.
Line 186: Line 246:
 For the moment, this is just a dump! So it might be unclear to you. I will try to polish this chapter in a dedicated article later, perhaps even use Mac OS Automator. But that will have to wait. For the moment, this is just a dump! So it might be unclear to you. I will try to polish this chapter in a dedicated article later, perhaps even use Mac OS Automator. But that will have to wait.
  
-==== Optimisation for Linux ====+=== Optimisation for Linux ===
 The following script is for Linux users and is based on a script that I have found in the [[http://​ubuntuforums.org/​showthread.php?​t=1088094|Ubuntu Forums - Firefox speedup(...)]]. It was slightly enhanced to look into more than one folder (if you have multiple installation of Firefox, like 3.0 and 3.5 in Ubuntu 9.04). You will need to install sqlite3 before. The following script is for Linux users and is based on a script that I have found in the [[http://​ubuntuforums.org/​showthread.php?​t=1088094|Ubuntu Forums - Firefox speedup(...)]]. It was slightly enhanced to look into more than one folder (if you have multiple installation of Firefox, like 3.0 and 3.5 in Ubuntu 9.04). You will need to install sqlite3 before.
  
Line 258: Line 318:
 exit 0</​code>​ exit 0</​code>​
  
-==== References ​====+=== References ===
  
 Here are a few pointers I have been using and some other great ideas: Here are a few pointers I have been using and some other great ideas:
   * Information on [[http://​kb.mozillazine.org/​Profile_folder_-_Firefox|Firefox profiles on Windows, Linux/UNIX and Mac OS]];   * Information on [[http://​kb.mozillazine.org/​Profile_folder_-_Firefox|Firefox profiles on Windows, Linux/UNIX and Mac OS]];
   * Sample code in Python for the same optimisation for [[http://​code.activestate.com/​recipes/​576843/​|Linux]] or for [[http://​code.activestate.com/​recipes/​576842/​|Windows]].   * Sample code in Python for the same optimisation for [[http://​code.activestate.com/​recipes/​576843/​|Linux]] or for [[http://​code.activestate.com/​recipes/​576842/​|Windows]].
 +
 +===== Pointers in C =====
 +
 +{{media:​pointer_allocation_in_subfunction.png|Pointer Allocation in Subfunction}}
perso/dump/mess.1286378418.txt.gz · Last modified: 2015/05/01 23:32 (external edit)