Welcome To BS WordPress Templates and WordPress Plugins
Welcome to your number one place on the net to get WordPress Templates and WordPress Plugins.
Are you Tired of finding Templates and Plugins with one-way back links automatically included in them. So are we, so we have decided to build this site and offer Free WordPress Templates and Free WordPress Plugins with out the links. We understand that the persons who makes and develop those plug-ins and templates would love to see something in return, but forcing you have a link is the old way.
You should be giving a choice to Share a link!!
Any Template you get from this site, will either be 100% Free or you will be given an option to put a link on your site back to us, we will not force you too.
Enjoy
BS
Generating Thumbnail Images from FLV with ffmpeg
This has been the easiest way for me to create thumbnails from flv files with ffmpeg in a php envirnment
$ffmpegpath = "/usr/bin/ffmpeg";
function make_jpg($input, $output, $fromdurasec="01") {
global $ffmpegpath;
if(!file_exists($input)) return false;
$command = "$ffmpegpath -i $input -an -ss 00:00:
$fromdurasec -r 1 -vframes 1 -f mjpeg -y $output";
@exec( $command, $ret );
if(!file_exists($output)) return false;
if(filesize($output)==0) return false;
return true;
}
Then use
#extract frame at 00:00:01 as jpeg
make_jpg("/test.flv", "/test.jpg", "01");
Network Management Disabled
Network Manager worked in the beginning after patching and rebooting the KNetworkManager showed “Network Management disabled”. No option to enable it again was available.
The issue was caused by
NetworkingEnabled=false
in
/var/lib/NetworkManager/NetworkManager.state
After changing it back to
NetworkingEnabled=true
in
/var/lib/NetworkManager/NetworkManager.state
and running
sudo service network-manager restart
everything worked fine again.
Full content of /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
root@ltdar2:/etc/NetworkManager# lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04
network-manager:
Installed: 0.8-0ubuntu2
Candidate: 0.8-0ubuntu2
Version table:
*** 0.8-0ubuntu2 0
500 http://ch.archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: network-manager 0.8-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic x86_64
Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
Date: Mon Apr 5 09:48:24 2010
EcryptfsInUse: Yes
Gconf:
InstallationMedia: Error: [Errno 13] Permission denied: ‘/var/log/installer/media-info’
IpRoute:
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.44 metric 2
169.254.0.0/16 dev wlan0 scope link metric 1000
default via 192.168.1.1 dev wlan0 proto static
Keyfiles: Error: [Errno 2] No such file or directory
ProcEnviron:
LANGUAGE=
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: network-manager
How to Run a Cron Job every 6 Hours
As a system admin you will run into times when you create a script that you want to run every so often and the best way to achive this is to set up a cron job. A cron job is run the system and once you create the cron job, it will run until you remove it.
Today I needed a cron job to run every 6 hours to flush the mysql servers cache.
To achive this you can create a script like
#!/bin/bash
mysql -u root -pyour_root_password -e "flush query cache";
Then put that into the cron to run every so often, my case 6 hours
0 */6 * * * /location-to-script/script.sh
or you can just create a cron job like
0 */6 * * * mysql -u root -pyour_root_password -e "flush query cache";