Min Conky Config

Här kommer min Conky-config som jag använder. Jag kan dock inte ta åt mig äran eftersom jag bara kopierat och ändrat nån rad.

own_window yes
own_window_type override
own_window_hints undecorated,below,skip_taskbar
background no
double_buffer yes
use_spacer yes
use_xft yes
update_interval 2.5
minimum_size 200 5
maximum_width 300
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
uppercase no
border_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color white
own_window_transparent yes
alignment top_right
gap_x 10
gap_y 15
override_utf8_locale yes
xftfont Terminus:size=8
#xftalpha 0.8
# ${execi 60 cal -3 | cut -c23-64}

TEXT
${color }${time %a, %B %e, %G}${alignr}${time %R %Z}
${color lightgrey}System uptime:${alignr}${color #ddaa00}${uptime_short}

${color }Linux Mint
${alignr}${kernel}${machine}

${color slate grey}Processor: ${alignr}${color }${execi 1000 cat /proc/cpuinfo | grep “model name” | cut -c14-36}
${color lightgrey}${tab 20}Freqency: ${color }${freq_g cpu0}Ghz
${color lightgrey}${tab 20}Load: ${color #ddaa00}${cpu}% ${alignr }${color }${cpubar 6,175}
${color lightgrey}${tab 20}Processes Running: ${color }${running_processes}
${color lightgrey}${tab 20}Processes Sleeping: ${color }${processes}

${color lightgrey}${tab 20}Högsta CPU Processer: $alignr CPU%
${color #ddaa00}${tab 40}${top name 1}$alignr${top cpu 1}
${color }${tab 40}${top name 2}$alignr${top cpu 2}
${color }${tab 40}${top name 3}$alignr${top cpu 3}

${color slate grey}RAM-Minne:
${color }${tab 20}Real: ${memmax} total / ${mem} in use
${color lightgrey}${tab 20}Used: ${color #ddaa00}${memperc}% ${alignr}${color }${membar 6,175}
${color }${tab 20}Swap: ${swapmax} total / ${swap} in use
${color lightgrey}${tab 20}Used: ${color #ddaa00}${swapperc}% ${alignr}${color }${swapbar 6,175}

${color lightgrey}${tab 20}Högsta RAM-Minnes Processer: $alignr MEM%
${color #ddaa00}${tab 40}${top_mem name 1}$alignr${top_mem mem 1}
${color }${tab 40}${top_mem name 2}$alignr${top_mem mem 2}
${color }${tab 40}${top_mem name 3}$alignr${top_mem mem 3}
${color }${tab 40}${top_mem name 4}$alignr${top_mem mem 4}
${color }${tab 40}${top_mem name 5}$alignr${top_mem mem 5}

${color slate grey}Disk: ${color }/dev/hda3 Linux (ext3)
${color lightgrey}${tab 20}Totalt: ${color }${fs_size}
${color lightgrey}${tab 20}Använt: ${color }${fs_used}${color lightgrey}${alignr}Tillgängligt: ${color }${fs_free}
${color lightgrey}${tab 20}Ledigt: ${color #ddaa00}${fs_free_perc}% ${tab 45}${color }${alignr}${fs_bar 6,175}

${color slate grey}Network:
${color lightgrey}${tab 20}IP: ${color }${addr eth0}
 
Ned: $color${downspeed eth0} k/s ${alignr}Upp: ${upspeed eth0} k/s
${downspeedgraph eth0 25,125 000000 ff0000} ${alignr}${upspeedgraph eth0
25,125 000000 00ff00}$color

Totalt: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768
61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}

${color slate grey}Kalender:

${alignc}${color lightgrey}${font DejaVu Sans Mono :size=8}${execi 60 cal -3 | cut -c23-64} $font



Filed under: Allmänt | Comments (0)

Fler bra linux program

Fler bra linux program

Glipper – Urklippshanterare
Conky – Visar system info på skrivbordet
RadioTray – Simpel radiospelare som lägger sig i tray



Filed under: Linux | Comments (0)

PHP – Koppla upp mot en databas

PHP – Koppla upp mot en databas

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( “Unable to select database”);

Filed under: PHP | Comments (0)

PHP – Visar antalet rader i en tabell

PHP – Visar antalet rader i en tabell

$result = mysql_query(“SELECT * FROM tabellnamn”);
$rows = mysql_num_rows($result); // $rows innehåller nu antalet rader som finns i “tabellnamn”.

Filed under: PHP | Comments (0)

PHP – Slumpa Nummer Mellan Två Tal

PHP – Slumpa Nummer Mellan Två Tal

srand((double)microtime()*1000000);
echo rand(15,30);

Filed under: PHP | Comments (0)

Loopa ut innehåll ur databas | PHP

Loopa ut innehåll ur databas | PHP

$result = mysql_query(“SELECT * FROM members ORDER BY name DESC”);
while ($r = mysql_fetch_array($result))
{
echo($r['name']);

Filed under: PHP | Comments (0)

Kryptering med PHP

Lite simpel kryptering för PHP

<?php
    define(‘SALT’, ‘din hemliga nyckel’);
  
    function encrypt($text)
    {
        return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
    }

    function decrypt($text)
    {
        return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));
    }
?>

Filed under: Allmänt | Comments (0)

How to install Lexmark X1270 under Linux

To get the Lexmark X1270 working under Linux you can use the drivers for the Lexmark Z600. (Only the printer will work, not the scanner) I had some problems to get it working at first, there was some libraries or whatever it was called that was missing so I added 3 files I needed in a archive for you to download.

But before you do that, add these PPA’s to the packet manager:
deb http://ppa.launchpad.net/jason-scheunemann/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/jason-scheunemann/ppa/ubuntu karmic main

Inside the archive:
z600cups_1.0-2_i386-3.deb
z600llpddk_2.0-2_i386.deb
libcupsys2_1.3.9-17ubuntu3.4_all.deb

Just unpack it and doubleclick on the files to install them.

Download Lexmark x1270 Drivers for Linux here.

Filed under: Allmänt | Comments (0)

Bra program för Linux

Det här är mest en post för mig själv som ska hjälpa mig komma ihåg alla program vid omformatering/ominstallation.

Deluge – Bra alternativ till uTorrent.
Geany – Bra texteditor, kan även använda syntax för tex HTML och PHP osv.
Filezilla – FTP-Program.
Mumble – Ventrilo-alternativ.
Pidgin – MSN och ICQ-klient.
XChat – IRC Chat.
Gnome Do – Starta program snabbt osv…

Filed under: Linux | Comments (0)

Sony Ericsson G900 – Piece Of Shit

My girlfriend just bought a Sony Ericsson G900. This cellphone is worthless! It’s so slow! It sometimes take 2-3 seconds just to get into submenus and it’s laggy everywhere! It’s so slow! It’s useless! She’s very unhappy with it. I tried to update the firmware and turning off effects and other bullshit to make it faster but it didn’t work. The Sony Ericsson G900 is a piece of shit. Don’t buy this crap-phone.

Filed under: Allmänt | Comments (0)
-