Skip to content

Instantly share code, notes, and snippets.

View bilalucar's full-sized avatar
💭
I may be slow to respond.

Bilal Ucar bilalucar

💭
I may be slow to respond.
View GitHub Profile
@bilalucar
bilalucar / gist:00d32d431b13d1715dbc0d8228b0cc46
Created February 15, 2017 06:34
Webmaster.Kitchen Link
<a href="https://webmaster.kitchen" rel="nofollow">Webmaster Kitchen</a>
//autoload fonksiyonu, PSR-0 standartların nasıl otomatik yüklendiğini gösterir.
<?php
function autoload($className)
{
$className = ltrim($className, '\\');
$fileName = '';
$namespace = '';
if ($lastNsPos = strrpos($className, '\\')) {
$namespace = substr($className, 0, $lastNsPos);
<?php
// side effect: change ini settings
ini_set('error_reporting', E_ALL);
// PHP 5.3 and later:
namespace ProjeAdi\Model;
class Foo
{
}
<?php
namespace Vendor\Package;
use FooInterface;
use BarClass as Bar;
use OtherVendor\OtherPackage\BazClass;
class Foo extends Bar implements FooInterface
{
public function sampleFunction($a, $b = null)
/**
* Interpolates context values into the message placeholders.
*/
function interpolate($message, array $context = array())
{
// build a replacement array with braces around the context keys
$replace = array();
foreach ($context as $key => $val) {
$replace['{' . $key . '}'] = $val;
}
<fieldset>
<legend>Personal Information:</legend>
<div>
<label for="first_name">First Name</label>
<input type="text" name="first_name" id="first_name">
</div>
<div>
<label for="last_name">Last Name</label>
<input type="text" name="last_name" id="last_name">
</div>
<link rel="canonical" href="https://webmaster-kitchen/seo-nedir"/>
//Bu, arama motorlarına, söz konusu sayfanın URL'nin bir kopyası gibi muamele edilmesi gerektiğini ve
//motorların uyguladığı tüm bağlantı ve içerik ölçümlerinin bu URL'ye geri dönmesi gerektiğini söyler.
<div>
SEO Conference<br/>
Learn about SEO from experts in the field.<br/>
Event date:<br/>
May 8, 7:30pm
</div>
<div itemscope itemtype="http://schema.org/Event">
<div itemprop="name">SEO Conference</div>
<span itemprop="description">Learn about SEO from experts in the field.</span>
Event date:
<time itemprop="startDate" datetime="2012-05-08T19:30">May 8, 7:30pm</time>
</div>
@bilalucar
bilalucar / gist:bf77554ec8508c6a41e56543e0245b00
Created March 1, 2017 09:32
Link Verirken Dikkat Edilmesi Gerekenler
<a href="../"> Anasayfa </a>
Bunun yerine şunu kullanırsınız:
<a href="https://webmaster.kitchen"> Ana Sayfa </a>