3 Eylül 2013 Salı

Raspberry Pi Statik IP alma ve Dinamik DNS

Bunun için önce modeminizin ip sini, ve netmask adresini öğrenmelisiniz. Windows’ta dos komutu olarak “ipconfig -all” yazarak modem ip nizi öğrenebilirsiniz. Geri kalan değerler için Raspberry Pi’nize bağlanıp/açıp terminalden şu komutu girin:
1ifconfig -a
Bu size bağlı olduğunuz network hakkında bilgi dökümü verecektir. Ethernet’ten bağlı ise “eth0″, kablosuz ağdaysanız “wlan0″ gibi bir değer sizin atanmış ip nizdeki değerleri döken bölüm olacaktır.
  • Buradaki “inet addr” değeri (bende 192.168.1.34 olan değer) DHCP tarafından Raspberry Pi’nize atanmış yerel ip adresidir. Mask değeri ise (bendeki 255.255.255.0) mask adresini belirtir. Modem IP’nize de 192.168.1.1 diyelim (bende öyle)
  • Şimdi ise aşağıdaki komutu çalıştırın:
    1sudo nano /etc/network/interfaces
  • Bu komut ile açılan editörde ağ ayarlarınızı göreceksiniz. Bende şu şekilde:
  • Buradaki en alttaki “iface eth0 inet dhcp” değerindeki “dhcp” değeri yerine static yazın. Yani son satır “iface eth0 inet static” olsun.
    Not: Eğer wireless olsaydı “iface wlan0 inet dhcp” satırı olacaktı.
  • Daha sonra altına şu satırları ekleyin:
    1#statik yerel ip adresi
    2address 192.168.1.10
    3#ifconfigdeki mask değeri
    4netmask 255.255.255.0
    5#modem/gateway ip si
    6gateway 192.168.1.1
    7#modem üzerinden atanaabilen ip aralığı
    8network 192.168.1.0
    9broadcast 192.168.1.255
    Buradaki atanabilen ip aralığı değişik biraz. Modeminiz tarafından atanabilen en düşük ip 192.168.1.1 ise 192.168.1.0 , broadcast’e de en yüksek ip yi yazmalısınız. Çoğu modemde x.x.x.255 olduğundan örneğimiz için 192.168.1.255 yazdım.
    Ayrı bir örnek vermem gerekirse 10.0.0.1 olsaydı modem ip’niz şöyle olacaktı değerler:
    1#statik yerel ip adresi
    2address 10.0.0.4
    3#ifconfigdeki mask değeri
    4netmask 255.255.255.0
    5#modem/gateway ip si
    6gateway 10.0.0.1
    7#modem üzerinden atanaabilen ip aralığı
    8network 10.0.0.0
    9broadcast 10.0.0.255
  • Daha sonra aşağıdaki komut ile networkin’i yeniden başlatın:
    1sudo /etc/init.d/networking restart
    2#bu satır da garanti olsun diye
    3sudo /etc/init.d/networking reload
  • Artık Raspberry Pi’niz bir statik IP’ye sahip.
  • Şimdi ise Üçüncü Parti bir DNS ayarlayalım

    Kabul edelim, TTNet, pek çok siteyi dns bazında engelleyerek kurunun yanında yaşı da yaktı, hem de çok hantallar. Bir taşla iki kuş vurmak, ve de sitelerden daha hızlı çözümleme tepkisi almak için Google DNS ya da Open DNS başarılı alternatifler.
    • Öncelikle Yukarıdaki adımlarla Raspberry Pi’nize sabit bir yerel IP verdiğinizden emin olun.
    • Daha sonra terminalden şu komutu çalıştırın:
      1sudo nano /etc/resolv.conf
    • Açılan sayfada şu şekilde DNS ip lerini girin:
      1nameserver ip1
      2nameserver ip2
      Not: Google DNS IPleri 8.8.8.8 ve 8.8.4.4, OpenDNS ip leri 208.67.222.222 ve 208.67.220.220
      Aşağıdaki resimde ben OpenDNS ip lerini girdim:
      • Daha sonra aşağıdaki komut ile networkin’i yeniden başlatın:
        1sudo /etc/init.d/networking restart
        2#bu satır da garanti olsun diye
        3sudo /etc/init.d/networking reload
      • Artık internet servis sağlayıcınız haricinde bir DNS kullanıyorsunuz, 
    • Kaynak: raspberrypi.gen.tr

31 Mart 2013 Pazar

Samsung Led TV Monitör ayarları

Review:
http://reviews.cnet.com/flat-panel-tvs/samsung-un46c6500/4505-6482_7-34001692.html

Related products:
UN32C6500
UN40C6500
UN55C6500
UN65C6500

Below you'll find the settings we found best for viewing the Samsung UN46C6500 in a dark room via the HDMI input with a 1080p, film-based source. Your settings may vary depending on source, room conditions, and personal preference. Check out the Picture settings and calibration FAQ for more information.
http://news.cnet.com/8301-17938_105-9996461-1.html

--Picture menu
Mode: Movie
Backlight: 9
Contrast: 93
Brightness: 44
Sharpness: 0
Color: 48
Tint: G50/R50

Eco Solution submenu:
Energy Saving: Off
Eco Sensor: Off
No Signal Power Off: Off

Auto Adjustment and Screen submenus: [Grayed out]

Advanced settings submenu
Black tone: Off
Dynamic contrast: Off
Shadow Detail: +2
Gamma: +1
Expert Pattern: Off
RGB Only Mode: Off
Color space: Auto
White Balance [see below]
10p White Balance: On
Flesh tone: 0
Edge enhancement: Off
xvYCC: Off
LED Motion Plus: Off

White balance submenu
R-Offset: 25
G-Offset: 23
B-Offset: 25
R-Gain: 25
G-Gain: 25
B-Gain: 19

10p White Balance submenu
Interval 1: Red 0, Green 1, Blue 0
Interval 2: Red 0, Green 0, Blue 0
Interval 3: Red 0, Green 0, Blue 0
Interval 4: Red 0, Green 0, Blue 0
Interval 5: Red 0, Green -1, Blue 0
Interval 6: Red 1, Green 0, Blue 0
Interval 7: Red 0, Green -1, Blue -1
Interval 8: Red 0, Green -2, Blue 0
Interval 9: Red 0, Green -3, Blue -1
Interval 10: Red 2, Green -1, Blue 0

Picture options submenu
Color tone: Warm2
Size: Screen Fit
Digital Noise Filter: Off
MPEG Noise Filter: Off
HDMI black level: Normal [grayed out]
Film mode: Off [grayed out]
Auto motion plus: Custom
-- Custom settings:
Blur reduction: 10
Judder reduction: 0
Auto Protection Time: 2 hours

29 Ekim 2012 Pazartesi

Windows 8 can't shut down!

Windows 8 new dynamic ticking feature can cause such freezes. 
bcdedit /set disabledynamictick yes
Base Filtering Engine service

http://social.technet.microsoft.com/Forums/en/W8ITProPreRel/thread/be4fd1a8-f8c8-4adb-a500-4448feba9f3f

26 Ekim 2012 Cuma

Windows 8 Kısayol Tuşları


10. Windows-PrtSc: Screen capture

PrtSc has long been the default option for screen capture in Windows, but in Windows 8 there’s a neat new twist: if you use Windows-PrtSc, a PNG file of the capture is saved in a Screenshots folder in your picture library. (If you don’t want the clutter of lots of picture files, PrtSc on its own still copies the screen to the clipboard, and Alt-PrtSc captures just the active window in non-Metro apps.)

9. Windows-C: Charms

Think of charms as a kind of super-sized options setting: you can use individual charms to share with other apps, search for information, change settings, or send something to a connected device such as a printer or drive.

8. Windows-Z: App bar

The app bar is essentially the equivalent of right-clicking: use it to access additional options in Metro applications.

7. Windows-Q: Search charm

This launches search options for any Windows application: if you’re in the store, for example, you need the Search charm to actually look for apps. Search is also accessible from charms (Windows-C), but using Windows-Q saves you extra clicking or arrowing around.

6. Windows-H: Share charm

Similarly, while you can access the Share charm (used to share information via email or to other apps) through the main charms list, this shortcut saves time getting there.

5. Windows-fullstop: Snap

This snaps a Metro app to the right, placing it in a narrow column so you can see crucial information (such as a Twitter feed) while working in another app. (By default, Metro apps take up the entire screen, which makes sense on tablets but can be annoying on large screens.) Repeating the key combination snaps to the left; repeating a third time maximises. To snap immediately to the left, use Windows-> (which is, in effect, Shift-Windows-fullstop).

4. Windows-Tab: Switch apps

The familiar Alt-Tab keyboard shortcut still cycles through open applications in the centre of the screen. If you only want to cycle through newer Metro applications, Windows-Tab is your friend, and switches in a list down the left-hand side.

3. Windows-D: Desktop

If you’re not using Metro apps and want a more familiar Windows interface, Windows-D opens up the desktop.

2. Windows-I: Settings

This is a speedy route to system-wide PC settings. It’s also where you’ll find the Power button if you want to shut down your machine entirely (by default, Windows 8 favours putting your system to sleep rather than a complete shutdown.)

1. Windows key (on its own)

Hitting the Windows key on its own brings up the Metro desktop. However, if you then start typing Windows will begin searching (just as it used to on the old Start menu), finding apps, files and settings. You can also switch to searching other Metro apps from within the interface. You can navigate the results with the arrow keys and Enter, so you don’t need to use a mouse at all.


  • Win : switch between the Start screen and the last-running Windows 8 app
  • Win + C : displays the Charms: the Settings, Devices, Share and Search options
  • Win + D : launches the desktop
  • Win + E : launches Explorer
  • Win + F : opens the File Search pane
  • Win + H : opens the Share pane
  • Win + I : opens Settings
  • Win + K : opens the Devices pane
  • Win + L : locks your PC
  • Win + M : minimises the current Explorer or Internet Explorer window (works in the full-screen IE, too)
  • Win + O : toggles device orientation lock on and off
  • Win + P : switch your display to a second display or projector
  • Win + Q : open the App Search pane
  • Win + R : opens the Run box
  • Win + U : open the Ease of Access Centre
  • Win + V : cycle through toasts (notifications)
  • Win + W : search your system settings (type POWER for links to all power-related options, say)
  • Win + X : displays a text menu of useful Windows tools and applets
  • Win + Z : displays the right-click context menu when in a full-screen app
  • Win + + : launch Magnifier and zoom in
  • Win + - : zoom out
  • Win + , : Aero peek at the desktop
  • Win + Enter : launch Narrator
  • Win + PgUp : move the current screen to the left-hand monitor
  • Win + PgDn : move the current screen to the right-hand monitor
  • Win + PrtSc : capture the current screen and save it to your Pictures folder
  • Win + Tab : switch between running apps

Windows+R to open Run, type shell:Startup

19 Ekim 2012 Cuma

Ağzımızı yağlı yiyeceklere alıştırıyor


Bilim insanları, kaşarlı tostu herkes için özel kılan sırrı ortaya çıkardı. Yapılan araştırmaya göre, erimiş peynirin tadındaki lezzet süt proteinlerinde saklı. İşin kötüsü, peynirin verdiği lezzet, ağzımızı yağlı ve bol kalorili yemeklere alıştırıyor.

Kaşarlı tostun karşı konulmaz lezzetindeki sır ortaya çıktı. Bilim insanları, kaşar peynirinin yaklaşık 65 dereceye kadar ısıtıldığı zaman yapısını oluşturan süt proteini karışımının dağıldığını ve ortaya insanların hoşuna giden krema benzeri bir tat çıktığını belirtti.

Ancak ortaya çıkan lezzetin insanların neden hoşuna gittiği hala bir sır. Bu soruyu yanıtlamak isteyen Hollandalı bilim insanları, vanilyalı krema üzerinde araştırma yaparak, tatlının krema özelliğinin belli faktörlere dayandığını tespit etti. Bu faktörler arasında yapışkanlık, homojenlik ve tatlının kıvamıyla yüzeyinin görünümü bulunuyor.

Araştırmada yer alan Wageningen Üniversitesi’nin Gıda ve Biyo Temelli Araştırma Bölümü’nden René de Wijk, tat testinde yer alan deneklerin ağırlıklı olarak ağıza daha az yapılan kremayı beğendiğini ifade etti. Wijk, buradan yola çıkarak, aynı faktörün peynir için de geçerli olabileceğini belirtti.

“LEZZET AĞIZDAKİ ALICILARI PROGRAMLIYOR”
Sıcak peynirin ağızda oluşturduğu his de işin içine eklenince, erimiş peynirin sahip olduğu yumuşaklık, az yapışkanlık ve sıcaklığı, bu yiyeceği son derece şişmanlatıcı ve keyif verici bir zevke dönüştürüyor.

‘On Food and Cooking’ adlı kitabın yazarı olan ve yemek pişirmekle kimya arasındaki ilişkiyi konu alan ABD’li kimyager-yazar Harold McGee, bireysel öğrenmenin etkisiyle, ağzımızdaki alıcıların daha yağlı, kalori yoğunluğu bol gıdalara alışıyor olabileceğini ifade etti.

McGee, “Şişmanlık doğuştan gelen bir şey olsun olmasın, ağızdaki bu algı yiyecek tüketme alışkanlığımızı yönlendiren bir sinyal olabilir” dedi.

26 Mayıs 2012 Cumartesi

Wordpress Database Temizliği


Being a database-driven software, the performance of your WordPress blog is closely related to how efficient your database is. The bigger and messier your database is, the slower is the performance of your blog.

If you have not been doing regular housekeeping and database maintenance, either because you don’t know how to do or you are just plain lazy, here are 8 useful tricks that you can use to clean up your WordPress database easily and quickly.

1) Turn off/delete post revision

While the post revision is a good way to make sure that any changes to a post is documented, it can be a waste of database and server resources if you are the only user of the blog and does not collaborate with other authors for article writing.

To prevent the post revision from cluttering your database, it is best to turn it off once and for all.

You can easily turn off post-revision by adding the following line to the wp_config.php file

define(‘WP_POST_REVISIONS’, false);

If you want to keep the post revision for record purpose, you can limit the number of revisions saved per post. In your wp_config.php file, add the following line instead:

define(‘WP_POST_REVISIONS’, no_of_revision);

and replace the no_of_revision by the number of revision copy you want to keep.

Removing existing post revisions

Turning off the post revision feature only restrict WordPress not to keep any revision for future posts. It does not delete the existing post revisions in your database. To delete all instances of post revision and all its related entries), we will make use of the delete-revision plugin with some simple modification (the plugin only delete the post revision. It does not delete all other unused entries that are related to the post revision).

Download the plugin delete-revision to your desktop.

Extract the zip file. Open up the delete-revision folder and load the delete-revision.php file in a text editor. Scroll down to the line 140 where you see

$sql = “DELETE FROM $wpdb->posts WHERE post_type = ‘revision’”;

replace it with

$sql = “DELETE a,b,c FROM $wpdb->posts a LEFT JOIN $wpdb->term_relationships b ON (a.ID = b.object_id) LEFT JOIN $wpdb->postmeta c ON (a.ID = c.post_id) WHERE a.post_type = ‘revision’”;

(Code adapted from Lester Chan)

Save the file. Upload the whole delete-revision folder to your blog plugins folder.

Activate the plugin. Go to the Delete-Revision page under the Setting section. Run the application to scan your database for all instances of post revisions and delete them from your database.

If you are keeping copies of post revision in your database, you should run the Delete-Revision manager once every few months to clean up your database.

2) Delete unused images

Everytime you upload an image, WordPress automatically create duplicate copies of that image and resize them to thumbnail and medium size. Most of the time, these images are not used. In addition, there could also be some images that you have uploaded, but did not use them in the post. These unused images could easily add up to a massive size and cause unnecessarily burden to the server and database.

The DUI (Delete Unused Images) plugin scans your WordPress blog and find those images that are not used or referenced to by any of the posts/pages. It then proceeds to delete them from the database/server.

To use the plugin, you have use a FTP program to chmod the Uploads folder (the folder where images are stored) to 777. Once you have deleted the unused images, chmod the folder back to 755 again to prevent access from other people.

Similarly, you should run this plugin every few months to clear up your database.

3) Optimize database

As you add or remove entries into the database, pocket of spaces are created. These are useless space and could cause your database to swell quickly. You can easily free up these spaces by running a SQL optimize table query in myphpadmin.

If you are not technically inclined or find it troublesome to log into your myphpadmin, the best way is to use the plugin WP-DBManager to manage your database.

Install and activate the plugin. Under the Database -> Optimize Database options, select the table that you want to optimize and click the Optimize buttonto start the optimization. It should take less than a minute.

You can also schedule it to optimize the database every few days/weeks/months

Go to Database -> Database option. Scroll down till you see the Automatic Optimizing of DB. Set the frequency for it to auto-optimize your database.

4) Delete unwanted plugin

If you have decided that you have no use for a particular plugin, deactivated them and delete them from your server. The more (unused) plugins you keep in your server, the longer it takes for WordPress to generate the plugin list and the higher tendency that it will slow down the loading time of your blog.

5) Uninstall plugin completely

When you deactivated/uninstall a plugin, the options or the tables that the plugin created are not removed. As you install and uninstall a lot of plugin, there will be more and more orphaned options and tables that are taking up precious space in your database.

For plugins that have created table entries in the database, you can use the abovementioned WP-DBManager to drop the respective table from your database.

For those plugins that have created options, you have to use the Clean Option plugin to hunt down the orphaned options and delete them from the database.

6) Remove unused themes

Similarly, if you have plenty of unused themes in the server, delete those that you don’t use.

7) Check your site for deadlinks

While it is an usual practise to link to other posts/blogs/domains in your articles, you should check frequently that the linked post/domain still exist and you are not left with a dead link. It can be very frustrating for your reader to follow your link only to find that the destination page is no longer around. In addition, too many dead links can also affect your search engine ranking. I am sure this is not something that you want to see.

The broken link checker plugin checks your new article for broken links as soon as it is published. It also scans your old posts when you are logged into the Admin page. Any broken links found are reported to you and you can choose to edit or unlink them from the posts.

8) Delete spam comment

It is common to receive tons of spam comments, sometime as soon as you post the article. Even though these spam comments are not shown in your blog, they are still gathered in your database to educate “intelligent” anti-spam plugins. If you received plenty of spam every day (or every hour), this could be taking up a lot of valuable database space. To erase the spam, either go to the Comment -> Spam page, check all the spam comments and select Delete from the dropdown box.

Alternatively, you can use the WP-Optimize plugin to clean up all spam and unapprove comments

The WP-Optimize plugin also comes with other features such as delete revision, optimize database table and change your username. Personally I would prefer to use the WP-DBManager to optimize my database table as it allows me to schedule the optimization task on a regular basis. In addition, the WP-Optimize is only tested for WP2.7, so if you are still using a WP version less than 2.7, you have to use it at your own risk.

Wordpress Login Security


1. Google Authenticator

It is a plugin that uses the Google Authenticator mobile app to give a two-factor authentication login to your WordPress site.

Note: Make a point that before you activate Google Authenticator, you have enabled two-factor authentication in your Google account and installed the Google Authenticator app in your Android, iPhone or Blackberry phone.

When the installation and activation process of the plugin is finished, open ‘Users -> Your profile’ and then you will be able to see the Google Authenticator settings.

There you will see ‘Active’ and a checkbox by its side. Check the box. Then when you will login the next time, it will ask you to enter the confidential key. And if If you fail to enter the correct key, it will not let you login.

2. One Time Password

The name says it all. This is an amazing tool that provides high security to your WordPress site. One Time Password lets you login to your site without putting in your real password. It makes a list of passwords that can be used to login ti the site, but the great past is that those passwords can only be used one time, so even if someone gets to know this password, it will be of no use to him [one time password, remember?]. This toll is very useful is you travel alot and login to your site using a cybercafe.

When its installation and activation process is finished, go to the One Time Password section to create your password list. Then enter a passphrase and click the “Generate” button.

It depends on you if you want to get a print of all the passwords and carry them with you.

When you want to login, it will show you a sequence number and all you need to do is to match the sequence number with the password list and enter the password

When you need to login, it will show a sequence number. You just have to match the sequence number with your password list and enter the password accordingly.

3. WP Login Security

This amazing tool works through the IP address. It demands admins to register or whitelist their IP address. Now when the admin logins, it will its IP address. And if the IP doesn’t matches the one in the list, then it will send an email to the admin with a link that has a one-time key.

The plus point of this plugin is that very little or almost no configuration is needed. All you are required to do is to just activate it and Voila!

4. Login Lockdown

Login Lockdown is a very useful plugin that records the IP address and timestamp of every unsuccessful login attempt. If the failed attempts continue within a short period of time from the same IP range, and the number of maximum attempts is reached then the login function would be disabled for all login attempts from that range.

5. WP Firewall 2

This plugin has nothing to do with login field, but it secures your site by looking into web requests to detect any malicious attack. It has the ability to halt the attack before it harms to your database.

After it has been activated, its configuration options can be found under the Firewall section. The default options give good results and anyone rarely needs to make any alterations.