Atsinaujinimas

by Niekutis 11. gegužės 2011 22:37

Pagaliau po ilgo ir nelabai skaldaus migravimo i naują hostingo aplinką numirgravau ir į naują Blog sistemą.

Labai tikiuosi, kad ji bus patogesnė ir geresnė ir rasit čia daugiau postų ir ne tik jų.

Tags:

Belekas

gpg

by Niekutis 5. balandžio 2011 22:50

Kartais prireikia sugeneruoti raktus tai kad būtų po ranka manualas kaip tai padaryti:

# gpg --gen-key
# gpg --export-secret-key -a "User Name" > raktas-secret.key
# gpg --export-key -a "User Name" > raktas-public.key

Tags:

Serveriai

Yii framework validators

by Niekutis 25. vasario 2011 22:51

Sveiki, 

ištraukiau pagrindinius validatorius, kurie yra Yii frameworke:

Validation rules reference

  • boolean : CBooleanValidator, validates that the attribute value is either trueValue or falseValue.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. falseValue, the value representing false status.
    3. strict, whether the comparison to trueValue and falseValue is strict.
    4. trueValue, the value representing true status.
  • captcha : CCaptchaValidator, validates that the attribute value is the same as the verification code displayed in the CAPTCHA.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. captchaAction, ID of the action that renders the CAPTCHA image.
    3. caseSensitive, whether the comparison is case sensitive.
  • compare : CCompareValidator, compares the specified attribute value with another value and validates if they are equal.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. compareAttribute, the name of the attribute to be compared with.
    3. compareValue, the constant value to be compared with.
    4. operator, the operator for comparison.
    5. strict, whether the comparison is strict (both value and type must be the same.
  • default : CDefaultValueValidator, sets the attributes with the specified value. It does not do validation. Its existence is mainly to allow specifying attribute default values in a dynamic way.

    1. setOnEmpty, whether to set the default value only when the attribute value is null or empty string.
    2. value, the default value to be set to the specified attributes.
  • email : CEmailValidator, validates that the attribute value is a valid email address.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. allowName, whether to allow name in the email address.
    3. checkMX, whether to check the MX record for the email address.
    4. checkPort, whether to check port 25 for the email address.
    5. fullPattern, the regular expression used to validate email addresses with the name part.
    6. pattern, the regular expression used to validate the attribute value.
  • exist : CExistValidator, validates that the attribute value exists in a table.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. attributeName, the ActiveRecord class attribute name that should be used to look for the attribute value being validated.
    3. className, the ActiveRecord class name that should be used to look for the attribute value being validated.
    4. criteria, additional query criteria.
  • file : CFileValidator, verifies if an attribute is receiving a valid uploaded file.

    1. allowEmpty, whether the attribute requires a file to be uploaded or not.
    2. maxFiles, the maximum file count the given attribute can hold.
    3. maxSize, the maximum number of bytes required for the uploaded file.
    4. minSize, the minimum number of bytes required for the uploaded file.
    5. tooLarge, the error message used when the uploaded file is too large.
    6. tooMany, the error message used if the count of multiple uploads exceeds limit.
    7. tooSmall, the error message used when the uploaded file is too small.
    8. types, a list of file name extensions that are allowed to be uploaded.
    9. wrongType, the error message used when the uploaded file has an extension name that is not listed among extensions.
  • filter : CFilterValidator, transforms the data being validated based on a filter.

    1. filter, the filter method.
  • in : CRangeValidator, validates that the attribute value is among the list (specified via range).

    1. allowEmpty, whether the attribute value can be null or empty.
    2. range, list of valid values that the attribute value should be among.
    3. strict, whether the comparison is strict (both type and value must be the same).
  • length : CStringValidator, validates that the attribute value is of certain length.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. encoding , string encoding.
    3. is, exact length.
    4. max, maximum length.
    5. min, minimum length.
    6. tooLong, user-defined error message used when the value is too short.
    7. tooShort, user-defined error message used when the value is too long.
  • numerical : CNumberValidator, validates that the attribute value is a number.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. integerOnly, whether the attribute value can only be an integer.
    3. max, upper limit of the number.
    4. min, lower limit of the number.
    5. tooBig, user-defined error message used when the value is too big.
    6. tooSmall, user-defined error message used when the value is too small.
  • match : CRegularExpressionValidator, validates that the attribute value matches to the specified regular expression.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. pattern, the regular expression to be matched with.
  • required : CRequiredValidator, validates that the specified attribute does not have null or empty value.

    1. requiredValue, the desired value that the attribute must have.
    2. strict, whether the comparison to requiredValue is strict.
  • safe : CSafeValidator, marks the associated attributes to be safe for massive assignments.

  • type : CTypeValidator, verifies if the attribute is of the type specified by type. (integer, float, string, date, time, datetime)

    1. allowEmpty, whether the attribute value can be null or empty.
    2. dateFormat, the format pattern that the date value should follow.
    3. datetimeFormat, the format pattern that the datetime value should follow.
    4. timeFormat, the format pattern that the time value should follow.
    5. type, the data type that the attribute should be.

    Example of time rule;

    array('org_starttime, org_finishtime',  'type', 'type'=>'time', 'timeFormat'=>'hh:mm'),
  • unique : CUniqueValidator, validates that the attribute value is unique in the corresponding database table.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. attributeName, the ActiveRecord class attribute name that should be used to look for the attribute value being validated.
    3. caseSensitive, whether the comparison is case sensitive.
    4. className, the ActiveRecord class name that should be used to look for the attribute value being validated.
    5. criteria, additional query criteria.

    By default, CUniqueValidator works with a single attribute that's presumed to be unique across the whole model table, but it can work with multi-attribute unique constraints as well. See CUniqueValidator::c2215 for an example.

  • unsafe : CUnsafeValidator, marks the associated attributes to be unsafe so that they cannot be massively assigned.

  • url : CUrlValidator, validates that the attribute value is a valid http or https URL.

    1. allowEmpty, whether the attribute value can be null or empty.
    2. pattern, the regular expression used to validates the attribute value.

Tags:

Programavimas

Dalinuosi nuoroda

by Niekutis 14. vasario 2011 22:56

http://code.google.com/more/table/

Tags:

Nuorodos

Kur galima skaityti dokumentus

by Niekutis 11. vasario 2011 22:57

Tags:

Nuorodos

SSL sertifikatų generavimas

by Niekutis 7. sausio 2011 22:59

Step 1: Generate a Private Key
openssl genrsa -des3 -out server.key 1024

Step 2: Generate a CSR (Certificate Signing Request) 
openssl req -new -key server.key -out server.csr

Step 3: Remove Passphrase from Key
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

Step 4: Generating a Self-Signed Certificate 

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=CH/ST=Bern/L=Oberdiessbach/O=Akadia AG/OU=Information
Technology/CN=public.akadia.com/Email=martin dot zahn at akadia dot ch
Getting Private key

Step 5: Installing the Private Key and Certificate

cp server.crt /usr/local/apache/conf/ssl.crt
cp server.key /usr/local/apache/conf/ssl.key

Step 6: Configuring SSL Enabled Virtual Hosts

SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

Step 7: Restart Apache and Test

Tags:

Serveriai

Trumpieji adresai

by Niekutis 20. lapkričio 2010 23:03

Yra nemažai nuorodų sutrumpinimo svetainių. Visai neseniai atradau, kad ir Google turi tokia paslaugą: http://goo.gl

O jei nepatinka google svetainės, kurios daro tą patį:

http://bit.ly

http://is.gd

http://ow.ly

http://cli.gs

http://saf.li

 

Tags:

Nuorodos

Laiško rašymo etiketas

by Niekutis 2. spalio 2010 23:22

Viename žurnale prajuokino perskaitytos 10 el. pašro rašymo taisykliu. Iš tikro reiktu visiems ju laikytis. Galite jas perskaityti orginalo kalba:

1. If you are sending an e-mail to multiple people, put their e-mail addresses in the BCC field and your own email address in the To: field. No one likes to share their private e-mail address with strangers.

2. The e-mail subject should be detailed enough to give the recipient an idea about the email content without having to open it. Single words like “Hi” or “Hello” or “Help” are a strict no-no. Think of meaningful but short titles.

3. Do not attach large attachments in your email since not everyone is on a broadband connection. If you have to send a large file over email, upload it to file sharing services like Yousendit and then pass on the link in the email.

4. If you have to e-mail more than two documents as attachments, zip them in one file. Doing this would ensure that the reciepient won’t miss downloading any file.

5. Do not write an e-mail while you are drunk or in a really bad mood. It will reflect on the style of your writing.

6. Do not request a Read Notification Receipt.

7. Always reply to e-mails especially the ones specifically addressed to you. The sender is waiting to hear from you.

8. Keep you e-mail message short and to the point. Sentences like “I hope this email finds you alive and well” look good only in letter correspondence.

9. Do not hit the Send button without doing a spell check. An e-mail with spelling mistakes or grammatical errors indicate that you have written the message in a non-serious mood and may convey a bad impression. Always read the message before broadcasting it to the world.

10. You may want to remove your personal mobile number and office number from your email signature if you are participating in a big mailing list. You never know the kind of people who have subscribed to the list.

Šaltinis: IT NEXT September 2010

Tags:

Belekas

A-to-Z links to websites featured in this issue of Web User September 2010

by Niekutis 1. spalio 2010 23:20

1Scan photo-scanning service www.1scan.co.uS 63
ADrive Basic www.adrive.com 35
Android store www.android.com 43
AOL News http://news.aol.co.uk 12
Asterisk Key http://bit.ly/yourtips4249 57
Atom Films www.atom.com 36
AVG Free http://free.avg.com 62
AVG Remover tool www.avg.com/us-en/download-tools 62
Bing keyword search www.bing.com/search?q= 58
BleachBit http://bleachbit.sourceforge.net 38
Blinkbox www.blinkbox.com/Movies/Free 36
Bloglines www.bloglines.com 46
Box Lite http://box.ne 35
Canon CanoScan 5600F http://bit.ly/canon249 63
Carbonite 4.0 www.carbonite.co.uk 50
Channel 4’s Film4 www.film4.com 36
Chester Zoo www.chesterzoo.org 15
Chick Video Joiner www.chickvideostudio.com 23
Classic Cinema Online www.classiccinemaonline.com 36
ClearCloud http://clearclouddns.com 58
ClearCloud set-up http://clearclouddns.com/Setup 58
CloudMagic www.cloudmagic.com 40
Custom Post Type UI plug-in http://bit.ly/howto1249 67
Dealtastic www.dealtastic.co.uk 12
DeskNotes http://desknotes.codeplex.com 39
Digg www.digg.com 14
Dirpy Studio http://dirpy.com/studio 25
Divvyus www.divvyus.com 13
Dragontape www.dragontape.com 14
Dropbox www.dropbox.com 34
Dropbox beta http://forums.dropbox.com 34
e-book format comparison guide http://bit.ly/wiki249 29
Edam www.edam.co.uk 13
Europe by Eurostar www.europebyeurostar.com 14
Exterminate 48 http://bit.ly/ext249 41
Feedingo http://feedingo.com 45
Feedshow.com www.feedshow.com 46
Free Commander www.freecommander.com 41
Free Documentaries www.freedocumentaries.org 36
Gap www.gap.eu 16
Genie Timeline Free www.genie-soft.com 54
GoCarShare www.gocarshare.com 16
GOM Player http://bit.ly/gom249 63
GOM Player tips http://bit.ly/gomtips249 63
Google www.google.co.uk 10,42
Google Chrome www.google.co.uk/chrome 62
Google Goggles www.google.com/goggles 43
Google Maps http://maps.google.com 58
Google Maps reset http://maps.google.com/maps?ftr=0 58
Google Reader www.google.com/reader 44
Grindstone 2 www.epiforge.com/Grindstone2 38
Grolsch www.grolsch.com 14
Hide In Picture http://bit.ly/249hide 28
HTC Home for Windows 2.0 http://htchome.codeplex.com 41
IDrive Basic www.idrive.com 35
iMovieTube www.imovietube.com 37
iStockphoto www.istockphoto.com 15
Jaman www.jaman.com/movies/free-movies 37
Jolicloud www.jolicloud.com 59
Konkura www.konkura.com 12
Libox app http://bit.ly/lib249 41
Libox software www.libox.com 41
Long URL Please Firefox add-on http://bit.ly/yourtips1249 57
Long URL Please homepage www.longurlplease.com 57
LoveFilm www.lovefilm.com 37
MailWasher Pro www.firetrust.com 62
MaxMax www.kmtools.win-os.pl 39
Metahyper www.metahyper.com 35
Movies4Men www.movies4men.co.uk 36
MyTrainTicket.co.uk www.mytrainticket.co.uk 32
MyVoucherCodes.co.uk www.myvouchercodes.co.uk 64
Netvibes www.netvibes.com 45
Norton Internet Security 2011 www.symantec.co.uk 48
Norton Online parental control https://onlinefamily.norton.com 49
Note-It www.veign.com 39
Nudo http://herotwin.com/nudo 39
Onbile www.onbile.com 60
Online cancellation rights http://bit.ly/oft249 20
Online-ConVert.com e-book converter http://ebook.online-convert.com 29
Open Handset Alliance www.openhandsetalliance.com 42
Panda Global Protection 2011 www.pandasoftware.co.uk 5
Pet Supermarket www.pet-supermarket.co.uk 13
PetrolPrices.com www.petrolprices.com 21
PetrolPrices.com at Twitter www.twitter.com/ukpetrolprices 21
Photoshop Express for Android www.android.com/market 41
Picasa http://picasa.google.co.uk 26
PNotes http://pnotes.sourceforge.net 39
Remember The Milk app http://bit.ly/rem249 41
Runtime Software’s GetDataBack http://bit.ly/gdb249 63
SkyDrive.com http://skydrive.live.com 56
Spirit of Nature www.spiritofnature.co.uk 15
Start 3D www.start3d.com 30
Sugar Rush http://bit.ly/sugar249 18
Tabbloid www.tabbloid.com 31
TalkTalk Forum www.talktalk.co.uk/forums 20
TARDIS www.bbc.co.uk/doctorwho 40
Tech Support Forum http://bit.ly/tsf249 63
Teeth Whitening Products www.teethwhiteningproducts.co.uk 16
The Caribbean Food Centre www.caribbeanfoodcentre.com 16
The Internet Archive www.archive.org 36
The Internet Archive Film Noir www.archive.org/details/Film_Noir 36
The Marine Guide www.themarineguide.com 15
The Social Network www.thesocialnetwork-movie.com 16
Thetrainline.com www.thetrainline.com 32
TheUglyBugBall.net www.theuglybugball.net 14
Thunderbird www.mozillamessaging.com 62
TimeComX www.bitdreamers.com/products 38
TweetDeck User Streams Preview www.tweetdeck.com/streaming 40
Value My Stuff Now www.valuemystuff.now 15
View Thru extension http://bit.ly/yourtips2249 57
VLC media player www.videolan.org/vlc 63
Windows gadgets http://bit.ly/gadgets249 63
Windows Live SkyDrive www.windowslive.co.uk/skydrive.aspx 35
WordPress 3.0 http://wordpress.org/download 66
Yahoo keyword search http://search.yahoo.com/search?p= 58
YouTube http://uk.youtube.com 25
YouTube movies www.youtube.com/movies 36
ZoneAlarm Free Firewall http://bit.ly/yourtips3249 57

Tags:

Nuorodos

Vakaro dangus

by Niekutis 15. liepos 2010 23:24

Pavyko užfiksuoti labai gražu šio vakaro dangu:

Tags:

Nuotraukos

Month List

RecentPosts

Informacija