Skip to content

Instantly share code, notes, and snippets.

View hdogan's full-sized avatar

Hidayet Doğan hdogan

View GitHub Profile
@hdogan
hdogan / us-extended.md
Last active December 27, 2021 14:06
Windows US Extended Keyboard Layout
@hdogan
hdogan / curl-smtp.php
Last active March 16, 2024 07:49
Sending SMTP e-mail with curl/php
<?php
function read_cb($ch, $fp, $length) {
return fread($fp, $length);
}
$fp = fopen('php://memory', 'r+');
$string = "From: <no-reply@example.com>\r\n";
$string .= "To: <hdogan@example.com>\r\n";
$string .= "Date: " . date('r') . "\r\n";
$string .= "Subject: Test\r\n";
@hdogan
hdogan / is-animated-gif.php
Last active March 10, 2017 07:54
Detects animated GIF from given file pointer resource or filename.
<?php
/**
* Detects animated GIF from given file pointer resource or filename.
*
* @param resource|string $file File pointer resource or filename
* @return bool
*/
function is_animated_gif($file)
{
$fp = null;
@hdogan
hdogan / phpkonf-bilet-kazananlar.txt
Last active August 29, 2015 14:25
PHPKonf 2015 için bilet kazananları belirleme kodcuğu.
@mrtozkanli
@zaherg
@ErhanPaker
@GurayYildirim
@elmor34
@bahadircakmak
@ibrahimmumcu
@iclalsuzgun
@EmreKizildas
@wardumpp
@hdogan
hdogan / cekilis.php
Last active September 23, 2020 11:00
Linux Yaz Kampı 2013 - PHP ile Yazılım Geliştirme Kursu Çekiliş Kodu
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title>Çekiliş</title>
<style>
body {
font-family: Tahoma, sans-serif;
font-size: 40px;
}
@hdogan
hdogan / laravel-3.2.5-raspberry-pi-benchmark.txt
Created April 26, 2013 14:28
Laravel 3.2.5 "Hello World" benchmark on Raspberry Pi Model B (512MB Ram), Raspbian (Debian 7), Transcend SDHC 4GB Class 6
SD-Card Performance Benchmark Results
-------------------------------------
Transcend SDHC 4GB Class 6
Write: 20 MB/s
Read: 19 MB/s
See http://elinux.org/RPi_SD_cards#Terminal_Commands to how to done write/read performance test.
Phalcon Framework "Hello World" Benchmark Results
-------------------------------------------------
OS: Raspbian (Debian 7)
@hdogan
hdogan / codeigniter-2.1.0-raspberry-pi-benchmark.txt
Created April 26, 2013 14:10
CodeIgniter 2.1.0 "Hello World" benchmark on Raspberry Pi Model B (512MB Ram), Raspbian (Debian 7), Transcend SDHC 4GB Class 6
SD-Card Performance Benchmark Results
-------------------------------------
Transcend SDHC 4GB Class 6
Write: 20 MB/s
Read: 19 MB/s
See http://elinux.org/RPi_SD_cards#Terminal_Commands to how to done write/read performance test.
CodeIgniter Framework "Hello World" Benchmark Results
-----------------------------------------------------
OS: Raspbian (Debian 7)
@hdogan
hdogan / yii-framework-1.1.13-raspberry-pi-benchmark.txt
Created April 26, 2013 13:11
Yii Framework 1.1.13 "Hello World" benchmark on Raspberry Pi Model B (512MB Ram), Raspbian (Debian 7), Transcend SDHC 4GB Class 6
SD-Card Performance Benchmark Results
-------------------------------------
Transcend SDHC 4GB Class 6
Write: 20 MB/s
Read: 19 MB/s
See http://elinux.org/RPi_SD_cards#Terminal_Commands to how to done write/read performance test.
Yii Framework "Hello World" Benchmark Results
-------------------------------------------------
OS: Raspbian (Debian 7)
@hdogan
hdogan / phalcon-1.0.1-raspberry-pi-benchmark.txt
Last active December 16, 2015 16:58
Phalcon 1.0.1 "Hello World" benchmark on Raspberry Pi Model B (512MB Ram), Raspbian (Debian 7), Transcend SDHC 4GB Class 6
SD-Card Performance Benchmark Results
-------------------------------------
Transcend SDHC 4GB Class 6
Write: 20 MB/s
Read: 19 MB/s
See http://elinux.org/RPi_SD_cards#Terminal_Commands to how to done write/read performance test.
Phalcon Framework "Hello World" Benchmark Results
-------------------------------------------------
OS: Raspbian (Debian 7)
@hdogan
hdogan / app.js
Created May 21, 2012 10:46
Titanium Mobile - iPad SplitWindow with NavigationGroup on Detail View and TabGroup on Master View
Ti.UI.setBackgroundColor('#fff');
/**
* Master view with tabGroup.
*/
var winMaster = Ti.UI.createWindow();
var tabGroup = Ti.UI.createTabGroup();
var winTab1 = Ti.UI.createWindow();
var winTab2 = Ti.UI.createWindow();