tisdag 16 december 2014

Facebook Test: what-character-are-you


link

Facebook test: how did you die in past life?

schyssta klubben

Have you ever wondered if you had a sixth sense? Well, now you know! In your past life, you were declared a witch and convicted to die on the stake. You actually had a very special gift and only meant well. Too bad people still don't realize that...

Glib error Firefox & Thunderbird

(process:30118): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed  (thunderbird:30118): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised  (thunderbird:30118): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised  (thunderbird:30118): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised  (thunderbird:30118): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
#en del av lösningen
$ sudo apt-get remove cinnamon-session  libpolkit-qt-1-1 libqapt2-runtime  lxde  lxde-common lxde-core lxinput lxsession lxsession-logout
$ sudo chown -R user:user /home/user


Bash Menu Script Exempel

Use ÅÄÖ in Linux bash

$ #!/bin/bash
$
export LC_ALL=en_US.UTF-8

Linux Thunderbird -safe-mode

$ cd usr/lib/thunderbird/thunderbird
$ thunderbird -safe-mode
$ echo "Hit the Enter key to continue"

Linux Bash search using firefox

$ read text
$ firefox -search "$text"
$ echo "Hit the Enter key to  continue"

Kill program in Linux Bash

måndag 15 december 2014

xmlstarlet RSS Bash

#!/bin/bash
#!/usr/bin/python
clear
RSS_URL=http://blåljus.se/rss.aspx
wget ${RSS_URL} -O - 2>/dev/null | \
xmlstarlet sel -t -m "/rss/channel/item" \
  -v "guid" -n -v "pubDate" -n -v "title" -n -v "description" -n -v "link" -n -n

# mitt första försök....
#wget -q -O- http://blåljus.se/rss.aspx| awk 'BEGIN{RS="<title>"}
#{
#gsub(/.*<description>|<\/description>.*/,"")
#gsub(/.*<rss version="2.0">|<\/rss>>.*/,"")
#gsub(/.*<channel>|<\/channel>.*/,"")
#gsub(/.*<link><\/link>.*/,"")
#gsub(/.*<language>|<\/language>.*/,"")
#gsub(/.*<pubDate>|<\/pubDate>.*/,"")
#print $0
#}'

tisdag 9 december 2014

Linux - Bash Linux Mint KDE 17.1 PPA

Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. clear
  3. echo "                                                         "
  4. echo "                                                         "
  5. echo "                          ''~''                          "
  6. echo "                         ( o o )                         "
  7. echo " +------------------.oooO--(_)--Oooo.------------------+ "
  8. echo " |                                                     | "
  9. echo " |     LINUX..                           BASH...       | "
  10. echo " |                      .oooO                          | "
  11. echo " |                    (   )   Oooo.                    | "
  12. echo " +---------------------\ (----(   )--------------------+ "
  13. echo "                        \_)    ) /                       "
  14. echo "                              (_/                        "
  15. echo "           http://verklighetochdrom.blogspot.se/         "            
  16. echo "                                                         "
  17. echo "                  hynt@speed-mailer.com                  "
  18. echo "                                                         "
  19. the_ppa01="deb http://archive.getdeb.net/ubuntu trusty-getdeb apps"
  20. the_ppa02="deb http://packages.linuxmint.com rebecca main upstream import"
  21. the_ppa03="deb http://extra.linuxmint.com rebecca main"
  22. the_ppa04="deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse"
  23. the_ppa05="deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse"
  24. the_ppa06="deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse"
  25. the_ppa07="deb http://archive.canonical.com/ubuntu/ trusty partner"
  26. the_ppa08="deb http://ppa.launchpad.net/osmoma/audio-recorder/ubuntu trusty main"
  27. the_ppa09="deb-src http://ppa.launchpad.net/osmoma/audio-recorder/ubuntu trusty main"
  28. #the_ppa10="deb http://www.remastersys.com/ubuntu precise main"
  29. the_ppa11="deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu trusty main"
  30. the_ppa12="deb http://ppa.launchpad.net/linuxonly/modem+manager+gui/ubuntu trusty main"
  31. the_ppa13="deb-src http://ppa.launchpad.net/linuxonly/modem+manager+gui/ubuntu trusty main"
  32. the_ppa14="deb http://ppa.launchpad.net/lkjoel/fix404sudo/ubuntu trusty main"
  33. echo "IF this is a new PPA, adding is Ok!"
  34. echo "$the_ppa01"
  35. echo "$the_ppa02"
  36. echo "$the_ppa03"
  37. echo "$the_ppa04"
  38. echo "$the_ppa05"
  39. echo "$the_ppa06"
  40. echo "$the_ppa07"
  41. echo "$the_ppa08"
  42. echo "$the_ppa09"
  43. echo "$the_ppa10"
  44. echo "$the_ppa11"
  45.  
  46. if ! grep -q "$the_ppa01" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  47.     # commands to add the ppa ...
  48.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  49.     sudo sh -c "echo '$the_ppa01' >> /etc/apt/sources.list"
  50. fi
  51. if ! grep -q "$the_ppa02" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  52.     # commands to add the ppa ...
  53.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  54.     sudo sh -c "echo '$the_ppa02' >> /etc/apt/sources.list"
  55. fi
  56. if ! grep -q "$the_ppa03" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  57.     # commands to add the ppa ...
  58.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  59.     sudo sh -c "echo '$the_ppa03' >> /etc/apt/sources.list"
  60. fi
  61. if ! grep -q "$the_ppa04" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  62.     # commands to add the ppa ...
  63.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  64.     sudo sh -c "echo '$the_ppa04' >> /etc/apt/sources.list"
  65. fi
  66. if ! grep -q "$the_ppa05" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  67.     # commands to add the ppa ...
  68.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  69.     sudo sh -c "echo '$the_ppa05' >> /etc/apt/sources.list"
  70. fi
  71. if ! grep -q "$the_ppa06" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  72.     # commands to add the ppa ...
  73.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  74.     sudo sh -c "echo '$the_ppa06' >> /etc/apt/sources.list"
  75. fi
  76. if ! grep -q "$the_ppa07" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  77.     # commands to add the ppa ...
  78.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  79.     sudo sh -c "echo '$the_ppa07' >> /etc/apt/sources.list"
  80. fi
  81. if ! grep -q "$the_ppa08" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  82.     # commands to add the ppa ...
  83.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  84.     sudo sh -c "echo '$the_ppa08' >> /etc/apt/sources.list"
  85. fi
  86. if ! grep -q "$the_ppa09" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  87.     # commands to add the ppa ...
  88.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  89.     sudo sh -c "echo '$the_ppa09' >> /etc/apt/sources.list"
  90. fi
  91. #if ! grep -q "$the_ppa10" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  92. #    # commands to add the ppa ...
  93. #    echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  94. #    sudo sh -c "echo '$the_ppa10' >> /etc/apt/sources.list"
  95. #fi
  96. if ! grep -q "$the_ppa11" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  97.     # commands to add the ppa ...
  98.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  99.     sudo sh -c "echo '$the_ppa11' >> /etc/apt/sources.list"
  100.     sudo apt-get update
  101.     sudo apt-get install y-ppa-manager
  102.  
  103. fi    
  104. if ! grep -q "$the_ppa12" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  105.     # commands to add the ppa ...
  106.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  107.     sudo sh -c "echo '$the_ppa12' >> /etc/apt/sources.list"
  108.  
  109. fi    
  110. if ! grep -q "$the_ppa13" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  111.     # commands to add the ppa ...
  112.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  113.     sudo sh -c "echo '$the_ppa13' >> /etc/apt/sources.list"
  114.  
  115. fi    
  116. if ! grep -q "$the_ppa14" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
  117.     # commands to add the ppa ...
  118.     echo -e "\x1B[01;89m ppa not found, adding: \x1B[0m"
  119.     sudo sh -c "echo '$the_ppa14' >> /etc/apt/sources.list"
  120.     sudo apt-get updates
  121.     sudo apt-get install fix404
  122. fi  
  123. sudo apt-get update

måndag 8 december 2014

FSlint eller FDupes för tabort dubletter!(linux)

FSlint är bra men FDupes använder md5sums och därefter byte för byte jämförelse för att hitta dubbletter av filer i en uppsättning av kataloger..men sistnämda är bara i terminalen

Backups är programet för mina backup (linux)


Mycket nöjd med deja-dup-preferences, men gillar .sh så leker nog snart med rsync

Svullna och ömma fötter

Jävla fötter svullna och ömma alldelees hårda men varit lila blå vette fan vad som hänt bara suttit på en stol och nu har jag raggsockar och en gummi slang placerad under fötterna så jag kan massera litemedans jag "jobbar" vidare...

Nalle puh har ADD (bild)


Vi med damp (bild)