2011. szeptember 17., szombat

Batch image resize and watermarking shell script

#!/bin/bash

WATERMARK="watermark700.png"
resize=2000

#Choices include: NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast.
WATERMARKPOS=SouthEast

OPACITY=60
QUALITY=85

DIR="."

# "*****************************************"
# "* Image Resize and Watermarking Script  *"
# "*         By Krutant.com                *"
# "*        With some tweaks...            *"
# "*****************************************"

clear

echo
echo "This script will OVERWRITE the source files, so work on a copy!"
echo

if [ $# -eq 1 ]
then

    #-----if there is a parameter----
    DIR="$1"
    echo "Target directory: $DIR"

    else

    echo -n "No parameter, current directory is: "
    pwd
    echo

fi


read -p "Watermark with file \""$WATERMARK"\" & resize all images to width "$resize"? (y/n)  " prompt

if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]

then

 echo ""

 shopt -s nullglob


 for each in $DIR/*{.jpg,.jpeg,.JPG,.JPEG}

 do

  echo -n "Working on "$each" ..."

  convert -resize $resize "$each" "$each" >> /dev/null

  composite -gravity $WATERMARKPOS -quality $QUALITY -dissolve $OPACITY $WATERMARK "$each" "$each" >> /dev/null

  echo "[Done]"

 done


# ---

  echo ""

  read -p "Press Enter to exit ..."

else

 exit 0

fi

2011. július 27., szerda

If Ubuntu 11.04 installer fails / freezes at the very end of the installation

No user to log in / Empty user list
Ubuntu 11.04 telepítés megszakad a legvégén
Üres felhasználói lista

--- BOOT FROM LIVE CD/USB ---

1. Install GRUB2
http://www.webupd8.org/2011/06/boot-repair-fix-ubuntu-boot-issues.html

2. CREATE USER

Open Terminal

To list all volumes type:
>mount

Search for the target HDD UUID:
for example: 550e8400-e29b-41d4-a716-446655440000 (it will be different from this)

>chroot /media/550e8400-e29b-41d4-a716-446655440000/

>adduser somebody

RESTART

Log in with the previously created user
Open Terminal
Type:
>sudo su
>passwd
Enter new root password

Make yourself administrator at System/Administration/Users and groups.
Make sure everything is OK, language, encodings, time zone, etc.

Thx for help: dr-willis, nyu at #Ubuntu IRC

2011. június 2., csütörtök

Informatikai Biztonság Wiki

Informatikai Biztonság Wiki
13+1 lépés: hogyan kerüld el a vírusokat, kémprogramokat, lelassulást,
adatvesztést...

https://www.facebook.com/informatikai.biztonsag

"Senkiháziak kezében van az IT szakma..."

A SORBS nem érti, hogy miért rossz dolog a Yahoo szervereinek IP címét blokkolni néhány spam üzenet miatt, akár több ezer ember levelezését bénítva meg ezzel a lépéssel.
A Yahoo biztonsági problémákkal foglalkozó címére írva a munkatárs meg nem érti meg, hogy ez miért probléma. Ezek után mit várunk a felhasználóktól?

2010. július 10., szombat

OSS fejlesztési modell

"Brooks törvényének alapelvei jók, de nagy fejlesztőközösség és olcsó kommunikáció mellett a hatásait elnyomják az egyébként láthatatlan, versengő nemlinearitások. Ez a newtoni és az einsteini fizika viszonyára emlékeztet, a régebbi rendszer még érvényes alacsony energiák mellett, de elég nagy tömeg és a sebesség esetén olyan meglepetések érhetnek, mint a nukleáris robbanás vagy a Linux."

http://magyar-irodalom.elte.hu/robert/szovegek/bazar/

2010. június 28., hétfő

Windows 7 no network after sleep mode - Nincs hálózat alvó állapotból való visszatéréskor

Megoldás: a hibrid alvás funkciót ki kell kapcsolni, a hibernálást letiltani,
majd újra engedélyezni.

A start menüben a leállításnál a hibernálásnak és az alvásnak is látszódnia
kell.


Ha egyáltalán nem jön vissza alvásból a gép:

Ideas for resolving not coming out of sleep:
1. Look in your BIOS for the suspend ACPI options and try to switch modes
among "S1 and S3", "S3" etc.
2. Ensure "Allow this device to wake computer" is checked in in "Device
Manager/$device$/ Properties/Power Management", where $device$ stands for
keyboard and mouse.
3. Turn off Hybrid sleep, see explanation here (for vista, but is the same)
4. The hibernation file is sometimes disabled by disk cleaning, to restore do
in cmd run as administrator "powercfg -h on".
You can use the following command to troubleshoot sleep problems and return a
detailed report: powercfg -ENERGY

http://superuser.com/questions/49130/windows-7-does-not-wake-up-from-sleep

2010. május 16., vasárnap

WayteQ P10 MP4 player AVI to MTV converter

WayteQ P10 MP4 player AVI to MTV converter
Download MTVVideoConverter_V1.12.11:
http://mympxdownloads.com/Downloads/p13_sectionid/2/p13_fileid/4
or
http://data.hu/get/8930766/MTV_Video_Converter_1.12.11.3.zip