Skip to main content

Posts

Showing posts from April, 2012

Split and merge files

source: http://linuxpoison.blogspot.com/2008/09/split-and-merge-large-files.html

split --bytes=1024m bigfile.iso small_file_
That command will split bigfile.iso into files that are 1024 MB in size (1GB) and name the various parts small_file_aa, small_file_ab, etc. You can specify b for bytes, k for Kilobytes and m for Megabytes to specify sizes.
To join the files back together on Linux:
cat small_file_* > joined_file.iso
If it was a video file and the file would not seek then VLC can fix the video index or even better use
mencoder -idx inputfile.avi outpufile.avi
to regenerate the avi index

Real time temperature monitor

CAUTION : The following script might damage/burn the laptop if used incorrectly.
Requires : sensors-detect , gnuplot
CAUTION : The following script might damage/burn the laptop if used incorrectly.
An easier way would be to use Psensor http://www.ubuntugeek.com/psensor-a-graphical-temperature-monitor.html but I want to do this manually to have greater control.
The temperature monitor script -------------------------------- #!/bin/bash

# CPU temperature monitor script
# do not have to edit beyond this line #------------------------------------------

if [ "$1" == "kill" ] then # if command line parameter is "kill" then kill all running instances of this script.
nnn=`ps aux | grep $0 | tr -s " " | cut -d" " -f2 ` echo -e $$ "\n====" # prints PID of this instance of script. make sure not to kill itself. for ii in `echo $nnn` do if [ "$ii" -ne "$$" ] then echo "Killing PID:" $ii kill -9 $…

How to make protein bars at home

Protein bars are the costliest thing around. But we can make them at home at 1/10 th of the price at very little effort. The recipe is by Dave Ruel as a part of his Anabolic Cooking.(http://anaboliccookingcookbooks.net/)
Homemade Protein Bars http://www.youtube.com/watch?v=5nYREcet5tQ
Ingredients: - 8 scoops chocolate protein powder - 1 cup oatmeal - 1/3 cup natural peanut butter - 3 tbsp honey - 1/2 cup 1% milk - 3 tbsp crushed peanuts
Directions: 1. Mix together the protein powder, oatmeal, peanut butter, honey and milk. 2. Form into 5 bars and then roll in the crushed peanuts to finish. 3. Place in the fridge for about 30-45 mins or until solid
If 5 bars are made.
Per Serving – 1 Bar Calories: 452 Protein: 50g Carbohydrates: 36g Fat: 12g
So if the no. of bars is different for you then multiply all nos. by 5 and divide by the no. of bars made.
Total ----- Calories: 2260 Protein: 250g Carbohydrates: 180g Fat: 60g