Skip to content

Instantly share code, notes, and snippets.

Working from own office

Sinan Eldem sineld

Working from own office
Block or report user

Report or block sineld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sineld.php
echo 'hayır hayır amca dedi';
sineld / SINAN.php
Created Feb 23, 2012
Sinan helper class
View SINAN.php
<?php defined('SYSPATH') or die('No direct script access.');
* Sinan helper class.
* $Id: sinan.php 1.0 2012-02-22 20:06:38Z Geert $
* @package Sinan
* @author Sinan Eldem
* @copyright (c) 2012 Sinan Eldem
sineld / turkish.php
Created Mar 9, 2012
Grocery Crud Turkish Language File
View turkish.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Grocery Crud Turkish Language File
Translated by Sinan Eldem
$lang['list_add'] = 'Ekle';
$lang['list_actions'] = 'İşlemler';
$lang['list_page'] = 'Sayfa';
View json-php.php
$dizi = array('koca' => array('isim' => 'sinan', 'yas' => 31), 'es' => array('isim' => 'bilge', 'yas' => 22));
echo 'Php: ';
$d = json_encode($dizi);
echo 'Json (encoded): ';
View gist:2651308
class Model_Student_Profile extends ORM {
* Model validation rules
public function rules()
return array(
sineld / DateFormat.php
Created May 21, 2012 — forked from cviebrock/DateFormat.php
DateFormat class for Laravel (or anyone)
View DateFormat.php
class DateFormat {
const DATE_SHORT = 'Y-m-d';
const DATE_LONG = 'F j, Y';
const DATETIME_SHORT = 'Y-m-d H:i';
const DATETIME_LONG = 'F j, Y, g:i a';

Here's how I setup Laravel on MAMP:

1. Add a .htaccess file to the root of the application with the following rules:

<IfModule mod_rewrite.c>
	RewriteEngine on

	RewriteRule ^$ public/ [L]
	RewriteRule (.*) public/$1 [L]
sineld / helpers.php
Created Jul 25, 2012
My dd replace
View helpers.php
* Dump the given value and kill the script or continue.
* <code>
* // Dump the $data variable and kill the script
* d($data);
* // Dump the $data variable and continue the script
* d($data,1);
sineld / laravel.php
Created Aug 28, 2012
Multiple Databases
View laravel.php
You can specify different connections in application/config/database.php. The keys for the connections array can be anything, they do not need to be "sqlite", "mysql", etc.
// application/config/database.php
'default' => 'fred',
'connections' => array(
'fred' => array(
'driver' => 'mysql',
'host' => 'localhost',
sineld / gist:3523439
Created Aug 30, 2012 — forked from msurguy/gist:3515621
Sublime Text 2 - Useful Shortcuts
View gist:3523439

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
You can’t perform that action at this time.