My skype started crashing all of a sudden with the above error. The suggested fix for now is to set enable-shm = no in /etc/pulse/daemon.conf or /etc/pulse/server.conf, whichever file your distribution uses. Restart X after updating the configuration.
Category Archives: Tips-N-Tricks
Enable Netfilter/Iptables on ArchLinux
I was surprised that iptables modules are not loaded automatically on ArchLinux. Here’s how you load them. Dump the following lines in any file (for eg. netfilter.conf) under modules-load.d and restart your machine. Alternatively load the modules manually if you want to avoid restarting.
@~ 1028$ cat /etc/modules-load.d/netfilter.conf x_tables ip_tables iptable_filter iptable_mangle nf_conntrack nf_defrag_ipv4 nf_conntrack_ipv4 nf_nat iptable_nat
Embedded Systems Tip: Compress Kernel Modules to Save on Disk Space
Just read about this package on AUR (Arch Linux User Repository) which compresses kernel modules using xz compression, so decided to make a note for myself that I should use this technique when required.
Remove Extra Columns Added by the WordPress SEO Plugin by Yoast
The WordPress SEO Plugin by Yoast is a wonderful plugin for all practical purposes. However its got a minor glitch (or feature – depends on how you perceive it) that it adds extra columns to all post listings. Removing them is easy, but not many people venture into that part of WordPress – The Screen Options. Unselect the columns corresponding to WordPress SEO in screen options so that you don’t have to see them in post listings again. Screenshot Below
Git: Show the diff for a particular commit
git show <commit>
Git: Search commit messages
git log --grep <string>
Install kmscon on Ubuntu Linux
Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS). It is an attempt to replace the in-kernel VT implementation with a userspace console. It is similar to the in-kernel terminal-emulator and is based on DRM. Listed below is the procedure to install kmscon in ubuntu.
sudo apt-get install libgles2-mesa-dev libgbm-dev libegl1-mesa-dev libdrm-dev libglib2.0-dev libfreetype6-dev git clone https://github.com/dvdhrm/kmscon.git ./autogen.sh make sudo ./kmscon --switchvt
The last command will start kmscon on /dev/tty8.
Assign Google Adsense Code to a PHP Variable
Assigning Google Adsense code to a PHP variable doesn’t work the way you would expect it to. I thought just deleting the newline characters and extra spaces from the adsense code and then assigning the resulting text to a variable should work. However it does not, and I’m not sure why. However what does work is shown below.
<?php $googleadsensecode = ' <script type="text/javascript"> google_ad_client = "pub-123456789"; google_ad_slot = "123456"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>'; echo $googleadsensecode; ?>
The following example does not work.
<?php $googleadsensecode = '<script type="text/javascript"> <!-- google_ad_client = "ca-pub-123456789"; google_ad_slot = "123456"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>'; echo $googleadsensecode ?>
sudo execute multiple commands with superuser/root permission
The longer way of executing multiple command with root permissions is to put all the commands into a script and then executing the script using sudo. However if you want to avoid doing that for something quick, the following command construct could be used.
sudo sh -c "whoami; whoami"
Makefile – Check if a file exists using wildcard function
The following snippet of code can be used to check for the existence of a file from within a Makefile.
ifneq ("$(wildcard $(PATH_TO_FILE))","") FILE_EXISTS = 1 else FILE_EXISTS = 0 endif
Quoting from make documentation.
$(wildcard pattern)The argument
pattern is a file name pattern, typically containingwildcard characters (as in shell file name patterns). The result of
wildcard is a space-separated list of the names of existing filesthat match the pattern.
In this present case, we are not using any wildcards, but the absolute path to the file.
