yum hangs because fastestmirror cache

I got installation hanged after this:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

so I checked if network is ok

nslookup ya.ru

it’s ok

then I removed fastestmirror cache and got things working

rm -f /var/cache/yum/timedhosts.txt

XChat: userlist disappeared

Today I had an issue when userlist dissapeared.
I found a root cause (occasionally I made it thin) and fix:

/set gui_pane_right_size 100

then switch to another channel

Edit remote files via FTP

I had this workable on MacOS because my source code editor supported FTP.
But on Linux Mint I found that my code editor (Geany) doesn’t support FTP and I needed solution (don’t want to switch to another editor).

The way is to mount remote ftp folder as local and edit files locally.

First of all install “curlftpfs”:

sudo apt-get install curlftpfs

Continue reading

How to clear memory cache on Linux Mint

I have system cache used a lot of memory after a long time of work with system so I looked for something what might clear the cache.

So these are scripts (available in 2.6.16 Linux core or newer):

  • Clears pagecache
  • sync
    echo 1 > /proc/sys/vm/drop_caches
    
  • Clears dentrie and inode кэши:
  • sync
    echo 2 > /proc/sys/vm/drop_caches
    
  • Clears pagecache, dentrie and inode кэши:
  • sync
    echo 3 > /proc/sys/vm/drop_caches
    

I’m using the last one.

Disable attachment preview in Mail.app on Mac

During my workday I’m sending very often some screenshots or documents and Mail.app does preview for a lot of them by default. That isn’t bad, but lot of mail clients doesn’t recognize these docs as attachments.

The most easy way is to disable preview.

To make it possible (disable preview) please execute in terminal (command line):

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

If you want to revert your changes then please do this:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool false

Mail.app restart might be needed after changes

Easy way to debug PHP script

If you can’t catch error in PHP script but something doesn’t work – add this to the beginning of your script:

ini_set('display_errors',1);
error_reporting(E_ALL);

this will allow you to see all errors.