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
@sineld
sineld / sentry.reset.password.php
Created Aug 30, 2012
Sentry Bundle Reset Password
View sentry.reset.password.php
<?php
// Forked from: http://paste.laravel.com/4iV
public function get_reset_password()
{
// render the reset password view
return View::make('auth.reset-password');
}
public function post_reset_password()
{
@sineld
sineld / README.markdown
Created Sep 6, 2012 — forked from msurguy/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
      # this function receives the typeahead object and the query string
@sineld
sineld / gist:3672253
Created Sep 8, 2012
Sublime Text 2 - Useful Shortcuts
View gist:3672253

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@sineld
sineld / snippet.xml
Created Sep 13, 2012 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
View snippet.xml
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@sineld
sineld / awesome-php.md
Created Sep 19, 2012 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
View awesome-php.md

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should be using:

@sineld
sineld / laravel-upload-resize.php
Created Sep 25, 2012
Laravel File Upload And Resize
View laravel-upload-resize.php
<?php
// Resizer and Image Manipulation
// Based on: http://forums.laravel.com/viewtopic.php?id=2648
public function post_edit_logo($id)
{
$rules = array(
'image' => 'image',
);
@sineld
sineld / table.php
Created Sep 25, 2012
Laravel Table relationships (how to)
View table.php
Based on: http://forums.laravel.com/viewtopic.php?id=2650
Question:
Hi friends,
I have just started with laravel (beautiful product) and have a question about table relationships.
I have three tables (projects / articles / images)
@sineld
sineld / optgroup.php
Created Oct 2, 2012
Laravel: Using form::select with <optgroup>
View optgroup.php
<?php
//Source: http://forums.laravel.com/viewtopic.php?id=2807
Route::get('optgroup', function()
{
$eat_options = array(
'animals' => array(
'cats',
'dogs',
'monkeys',
@sineld
sineld / read-file-contents.php
Created Oct 3, 2012
Php ile dosya içeriği okuma - Read file contents with php
View read-file-contents.php
// Source URL: http://forum.ceviz.net/php/121070-veritabani-bilgileri-include-etmek.html#post711169
File to read (readme.php) contents:
; <?php exit; ?> DO NOT DELETE THIS LINE
dbhost="localhost"
dbport="3306"
dbuser="root"
dbpass=""
dbname="webtrees"
View tarihFarki.php
<?php
function tarihFarki($startDate, $endDate)
{
$startDate = strtotime($startDate);
$endDate = strtotime($endDate);
if ($startDate === false || $startDate < 0 || $endDate === false || $endDate < 0 || $startDate > $endDate)
return false;
$years = date('Y', $endDate) - date('Y', $startDate);
You can’t perform that action at this time.