Thursday, November 10, 2011

dell gx260 modprobe p4_clockmod

step1/3...................
to load cpu speed ondemand [powertop o].............
su: modprobe p4_clockmod =======================
step2/3...................
$ lsmod | grep freq
/*****************************************************
*** to set p4_clockmod  [my dell gx260 pc] on reboot **
*****************************************************/
step3/3:.............................
Now that [p4_clockmod.ko] works my dell gx260. I will want to load [p4_clockmod.ko] on boot. To do this on a Debian based system like K/X/Ubuntu put the following line in the /etc/modules file. ===========
line @ /etc/modules file: p4_clockmod #thats it powertop must of set it to ondemand.
###################################
su:
powertop
#####################################
option [O] oh will let powertop change cpu to ondemand mode. --------------------------------------
and it should save some power. ##########################################
view the changes made by powertop [sesion]...
$ watch -n 1 cat /proc/cpuinfo
note:.........................................
conky does the same thing. it wil monitor cpu speed.
##############################################
view cpu info..................................
code: $ cpufreq-info ==============================================
tut@http://doc.opensuse.org/products/draft/SLES/SLES-tuning_sd_draft/cha.tuning.power.html
#################################
$ cpufreq-info 
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 283 MHz - 2.27 GHz
  available frequency steps: 283 MHz, 567 MHz, 850 MHz, 1.13 GHz, 1.42 GHz, 1.70 GHz, 1.98 GHz, 2.27 GHz
  available cpufreq governors: powersave, conservative, ondemand, userspace, performance
  current policy: frequency should be within 283 MHz and 2.27 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

  current CPU frequency is 283 MHz.
  cpufreq stats: 283 MHz:51.95%, 567 MHz:2.19%, 850 MHz:4.47%, 1.13 GHz:0.78%, 1.42 GHz:0.09%, 1.70 GHz:0.18%, 1.98 GHz:0.04%, 2.27 GHz:40.29%  (143)
--------------------------
how to load at boot.........
info @ http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html
i added p4_clockmod to /etc/modules file.
thats all i needed to do for a dell gx260 running mepis8 with the debian/lenny kernel

wallpaper blue gimp

my fav.



source wallpaper

Sunday, October 30, 2011

python loop 33cels to 91fahr

more stupid python code snippets from me by gleeming crap on the interwebs.

# convert Celsius to fahrenheit SCRIPT. #

print " type 'stop' to end this app and return to python shell"
print " this app converts celsius to Fahrenheit via loop nesting. "
print " if num line is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'

###
#c = 33
#f = (reply)*9/5 + 32
#print (c), "degrees (c) celsius " "= " ,(f), "degrees (f) Fahrenheit  "
###

# f = (num)*9/5 + 32 

while True:
    reply = raw_input('Enter your text number now:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply ) *9/5 + 32
        if num   :
        #     print('low')
        # else:
          print(num ) 
     
print('Bye')

stupid python 91fahr to 32cels code snippet



run code in console:
$ python ./my-dumb-code.py
##############
cut and paste code:
# python 
# fourmula //::: C = (F - 32) * (5 / 9)
# convert fahrenheit to Celsius   SCRIPT. #
# darn this lame scrip took me forever to guese #
################
print " type 'stop' to end this app and return to python shell"
print " this app converts   Fahrenheit to celsius via loop nesting. "
print " if num is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'



 

while True:
    reply = raw_input('Type "stop" to exit or 1 to contunue:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply )   ##-32
        if num   :
           f2c = int(raw_input("Please enter the temperature in Fahrenheit you wish to convert: "))
           f2c = (f2c - 32) *5/9 
          # print f 
           print ">> input converter to cels ="
           print  f2c
        #     print('low')
        # else:
        #  print(num ) 
     
print('Bye')

python fahrenheit to celsius.
NOTES::
//°C to °F Farenheit = (9/5)* celsius + 32
//°C to °F Multiply by 9, then divide by 5, then add 32
//// °F to °C Deduct 32, then multiply by 5, then divide by 9
// (fahr -32) * (5.0/9.0)

fahrenheit to celsius c++ snippet


it took my slow ass all day to learn this crap.

test my c2f c++ sloppy code

Saturday, October 29, 2011

my sloppy c++ mplayer-svn code

compile: $ c++ infile.cpp -o outfile.bin

Sunday, May 22, 2011

mepis8 ffmpeg x11grab desktop capture

capture
fffffffffffffffffffff
[bitrate 800] 

$ ffmpeg -f oss -ac 2 -i /dev/audio \ -f x11grab -r 25 -s 1024x600 -i :0.0 -b 800 video-n-sound-test_av.mpeg
note:"alsa-oss" may be need to be installed for "/dev/dsp" to work.
------------------
[check] "capture" control on it needs to be used to grab mic sound recording.

mepis8 webcam ffmpeg 5moy2011

tested 5moy2011 mepis8 ...
mepis8 uname -r 2.6.27!!!

---------------------
mpeg
352x288

/**************
****mepis8 ****
*************/

this work with the [ffmpeg -formats] [-f mpeg]
==================

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so \ ffmpeg -f oss -i /dev/dsp -acodec mp3 -f mpeg -s 352x288 -r 30000/1001 -i /dev/video0 -qmin 4 -qmax 4 -b 500 -aspect 4:3 -f mpeg -r 30000/1001 -y vid-mpeg-ffmpeg-with-mp3sound-q4.mpg


NOTE: "/dev/dsp" can probably be swapped out with [/dev/audio] .

mepis8 is built on debian lenny repos. Debian's ffmpeg is missing alot of codecs but it works better than MENCODER for av sync web cam recording because mencoder did not keep the audio in sync.
for /dev/dsp to work it may require "alsa-oss.deb" the legacy compliance ap layer is likely needed. "?"
------------------
[check] "capture" control on it needs to be used to grab mic sound recording.

alt.....
NOW ffmpeg-svn
alt.....
Now mepis8 with debiand's 2.6.26 kernel loaded
uname -a
Linux mepis1 2.6.26-2-686 #1 SMP Wed Sep 21 04:35:47 UTC 2011 i686 GNU/Linux

/******************
*** debian / lenny *
*******************/
##############################
mpeg
================
640x480
================
mepis8 uname -r 2.6.27-***
mepis8 code:
$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so \
############
or
debian/lennny
uname -r 2.6.26-2-686
video :large
code lenny:
$ nice -n 19 ffmpeg -f oss -i /dev/dsp -acodec mp3 \ -f video4linux \ -s 640x480 \ -r 30000/1001 \ -i /dev/video0 -qmin 4 -qmax 4 \ -b 500 -aspect 4:3 \ -f mpeg -r 30000/1001 \ vid-[large]-mpeg-ffmpeg-with-mp3sound-q4-large.MPG
video :small
code lenny:
$ nice -n 19 ffmpeg -f oss -i /dev/dsp -acodec mp3 -ac 2 \ -f video4linux \ -s 352x288 \ -r 15000/1001 \ -i /dev/video0 -qmin 4 -qmax 30 \ -b 500 -aspect 4:3 \ -f mpeg -r 20 \ vid-[small]-mpeg-ffmpeg-with-mp3sound-q4-small.mpg

Friday, May 13, 2011

test my ffmpeg webcam vlog script

for lubuntu 11.04
webcam test script. has auto renaming using the time function.
os: linux Lubuntu11.04 @ 5moy2011 uname -r 2.6.38-8-generic hardware: acer aspire one [aod255e] webcam video driver: video4linux2 audio drivers: alsa for the mic.
#################################### note the low bitrate and frame rate, netbook settings are kind of slow so keep the bitrate, codecs and frame rate low so that the netbook keeps up with ffmpeg. press Q to stop ffmpeg.
#!/bin/bash
#
# test auto vlog1 [ naming] script and capture byant.
##############################
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
###############################

DIR=/home/"user"/vlog



  ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
-vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0  vv1temp-out-lowercase.avi &&
  

 sleep 2

 for old in `ls   ~/vlog/*.avi` ; do today=~/vlog/`date +%F+Hour%H+Min%M+Sec%S`.AVI  ;  mv     $old $today; done


lubuntu mods below. ########################################## sound works , video works , wifi and lan work. not bad for a 200$ netbook from walmart.
lsmod
Module                  Size  Used by
cryptd                 19801  0 
aes_i586               16956  3 
aes_generic            38023  1 aes_i586
parport_pc             32111  0 
ppdev                  12849  0 
snd_hda_codec_realtek   255820  1 
joydev                 17322  0 
snd_hda_intel          24140  6 
snd_hda_codec          90901  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              13274  1 snd_hda_codec
snd_pcm                80244  4 snd_hda_intel,snd_hda_codec
snd_seq_midi           13132  0 
arc4                   12473  2 
snd_rawmidi            25269  1 snd_seq_midi
snd_seq_midi_event     14475  1 snd_seq_midi
i915                  450944  2 
snd_seq                51291  2 snd_seq_midi,snd_seq_midi_event
brcm80211             690428  0 
snd_timer              28659  4 snd_pcm,snd_seq
snd_seq_device         14110  3 snd_seq_midi,snd_rawmidi,snd_seq
sparse_keymap          13666  0 
mac80211              257001  1 brcm80211
uvcvideo               66851  0 
drm_kms_helper         40745  1 i915
cfg80211              156212  2 brcm80211,mac80211
videodev               75143  1 uvcvideo
psmouse                73312  0 
drm                   180037  3 i915,drm_kms_helper
snd                    55295  17 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
serio_raw              12990  0 
soundcore              12600  1 snd
snd_page_alloc         14073  2 snd_hda_intel,snd_pcm
i2c_algo_bit           13184  1 i915
video                  18951  1 i915
lp                     13349  0 
parport                36746  3 parport_pc,ppdev,lp
usbhid                 41704  0 
hid                    77084  1 usbhid
ahci                   21591  2 
libahci                25548  1 ahci
atl1c                  36237  0 
#########################################
/********************** *** debian lenny old ** *********************/ and now for debian lenny mepis8/debian/lenny
debian lenny webcam scrypt. uname -r 2.6.26
#!/bin/bash
#
# test auto vlog1 [ naming] script and capture byant.
##############################
## lubuntu settingd BAK#
##ffmpeg -r 15 -b 800k -s 640x400 -f video4linux2 -i /dev/video0  \
## -vcodec msmpeg4v2 -f alsa -ac 2 -vol 512 -i hw:0,0 vlog111div3-vol512_alsa.avi
##
###############################

DIR=/home/"user name"/vlog1



 nice -n 19 ./ffmpeg-svn -f oss -i /dev/dsp -acodec mp3 -ac 2 -vol 512 \
  -f video4linux  -s 640x480 -r 30000/1001  -i /dev/video0  \
 -f avi -vcodec msmpeg4 -qmin 4 -qmax 7 -b 800 \
 vv1temp-out-lowercase.avi &&
  

 sleep 2

 for old in `ls   ~/vlog1/*.avi` ; do today=~/vlog1/`date +%F+Hour%H+Min%M+Sec%S`.AVI  ;  mv     $old $today; done

ok.

Friday, April 8, 2011

Budget left for dead [2011] Big-Government


liberal hippie entitlements and other drugs.
4moy2011
The Left suck. 4/8th/2011 FED Budget left for dead. Two years in office and no balance budget plan "democrats". "liberals" Wow It's hard work doing nothing. "Wow dude it's hard balancing the budget." You get nothing for nothing. ----------------------- [fiction watch/2011] The zombies of DC are out to destroy the future and eat your rotting broke hippie hobo corpse. These democrats spend 3.3trillion dollars like it's nothing.

I come to conqueror your stupid planet. Take me to your leader.

Thursday, March 31, 2011

amazon cloud player ftw | chrometastic | screw itunes

3moy2011
3moy2011
Amazon's cloud player | chrometastic | screw itunes The (Cult of mac ) faces a new enemy. Steve the hollow and his lawyers sue amazon over the app store name, and amazon counter punches with the (itunes killer) amazon cloud player. Thank you amazon, apple should stick to fighting old over the hill tech companies like microsoft. when apple tries to take on new modern tech companies like google or amazon apple will fail.
apple is still evil. (idiot)tunes (idiot)pad. Apple fears all competition and choice.
Idiot - Wikipedia, the free encyclopedia An idiot, dolt, or dullard is a mentally deficient person, or someone who acts in a self-defeating or significantly counterproductive way. ...

Monday, March 28, 2011

ipad2 apples dog breakfast 3moy2011


3moy2011
Hi Steve . nothing new here.
apple rolls out another over hype gizmo, ipad2 the posh elite uber gizmo.
Ipad2 (2x) better than ipad1. me so specail love me now.

I can smell the magic all ready $$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$

Thursday, March 24, 2011

apple steve jobs hating on amazon app store.

24th, thu, /march 2011.

apple steve jobs hating on amazon app store. Why so serious? jobs ?
apple hates competition. apple hates linux. I think maybe apples just plain evil.

apple the land of evil. Why would any one buy anything from this evil company.

I hate gadget blogs part1 3moy2011

gadget blogs uggggg.
Why do i hate gadget blogs? Why do they pretend to be tech blogs? Why do they pretend to be consumers blogs?

HATE ME KNOW. Gadget blogs are in the pocket of press realise departments.
HATE ME KNOW. Gadget blogs are slaves to seo.
HATE ME KNOW. Gadget blogs are driven to to post first and post often, this leads to a fat messy blog filled with a lot of empty calorie garbage.
--------------------------------
(FUD) NOTE may 2nd 2011 ; AT&T is going to start caping att dsl users to 150GiB ! and 250GiB for uvers costumers. that's includes your uploads. and for bittorrent users the caps are nearly a death nail if you seed back a couple of gigs a day. (FUD) ATT CAPS strike a death nail for bittorrents, hulu,netflix, and other high end video consumption. HATE ME KNOW? All most all the gadget blog post on att caps read just like att's press release almost word for word. The lack of discussion on net neutrally was unforgivable for blogs that consider themselves Internet and tech blogs advocates for consumers. I guess they were to busy gety their party on at sxsw to care. ONe OF THE BETTER BLOGS arstechnica DID A GOOD JOB REPORTING. http://arstechnica.com/tech-policy/news/2011/03/is-atts-new-150gb-dsl-data-cap-justified.ars
but Are gadget blogs real media, or fronts for press release garbage?
-----------
END of part1 the gadget blog bubble.

Monday, January 31, 2011

Debian squeeze rc2 jan 2011


gnome desktop.
and now for the good the bad the ugly.
debian squeeze rc2........ the good: it found and setup my hp photosmart c4700 printer semi automatically "automagically". note1: debian squeeze "how did it find my printer?" I turned on my printer and clicked on xsane to to test the scanner, xsane found my scanner and then gnome found the printer . my printer. note2: squeeze: I the used synaptic to install hplip-gui so that i can monitor my printer and it's ink usage. then i configured (gnomes menu) to show debian menu , so that i can use it to launch hptoolbox/devices." other notes: using hplip source on other distrose. gnewSense: 1moy2011... I bought the hp photosmart c4780printer a couple of weeks ago from Biglots for 70$. I've used the hp photosmart printer with gnewSense linux after installing hplip from source. link: hplip.sourceforge.net hplip source "hplip-3.11.1.run" works good with gnewsense wich is based on debian/ubuntu8.04lts. ----------------- the bad: arch linux hplip-gui fails to launch and the source fails to build. I hate rolling bugy distributions. I tested arch i got frustraded so i installed debian squeeze on my backup tower and it worked a hel of a lot better than ARCH . and it was easy to set up my printer on debian squeeze rc2. DEBIAN ftw. ----------------- printer: debain squeeze: hplip just worked no muss no fuss. Hp photosmart c4700 printer driver and scanner just work. ------------------- printer: gnewsence: with gnewSense the instal of hplip from source worked good. printer works by default without hplip source. but scanner will only work after istalling hplip from source.. for more advance printer control source also adds hplip-gui/ hp toolbox for hp printers... ------------------------ printer: ubuntu9.04" almmost every thing fails ot of the box. ubuntu9.04" cups was broken. i installed selinux so that aparmore would get removed by synaptic.. cups worked for printing but hplip source would not compile pecause of broken dependacies... ubuntu9.04 howto: dowload the cups-dev's needed to compile hplip source ### all in one download. ## $ sudo aptitude download libcupsys2-dev libcups2-dev libcupsimage2-dev then use ar to extract the broken files by hand and the use file manager to to copy the dev.h files into place. after that do not run let "hplip*.run" as root. test the ./configure file fist. if it works then try the "sh *.run" file or try make the make install. note: as of jan 2011 hplip-3.11.1.run dose work with ubuntu9.04 if you can fix cups and the cups-dev's header files by hand. ubuntu9.04 is not suported by ubuntu anymorethats why it's such a clude to set the printer and cups. -------------------------- debian squeeze rc2: pro: back to squeeze. squeeze boots faster than lenny for me. pro: squeeze feels like a rock solid debian system. i love debian it's just stable. But cons: default file extension was ext3 not ext4. con: no conky in squeeze repository at this time.