Skip to content

Instantly share code, notes, and snippets.

View tarex's full-sized avatar
🎯
Focusing

Tareq Jobayere tarex

🎯
Focusing
View GitHub Profile
<?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',
);
@tarex
tarex / create.applescript
Created December 15, 2012 18:07
Create new file with Alfred
property DefaultPath : "~/Desktop"
property fileExt : ""
on alfred_script(q)
tell application "Finder"
try
set currentPath to (POSIX path of (target of front window as alias))
on error
set currentPath to DefaultPath
@tarex
tarex / tooltip.js
Created October 14, 2012 03:29
jquery plugin - tooltip
// tooltip , i used in http://fbviralpictures.com/
(function(jQuery) {
jQuery.fn.k_tooltip = function(options) {
var defaults = {
use: 'title',
tooltipClass: 'tooltip'
};
var options = jQuery.extend(defaults, options),
@tarex
tarex / snippet.xml
Created September 16, 2012 09:43 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<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');
@tarex
tarex / gist:3683635
Created September 9, 2012 10:13 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8
@tarex
tarex / gist:3479726
Created August 26, 2012 13:58 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@tarex
tarex / index.php
Created August 26, 2012 13:51
wordpress plugin [widget] - show recent comments with category
<?php
/*
Plugin Name: Extended Commnets
Plugin URI: https://gist.github.com/gists/3479610
Description: wordpress plugin [widget] - show recent comments with category
Version: 0.1
Author: Tareq Jobayere
Author URI: http://twitter.com/tareq_jobayere
License: i don't know
*/
@tarex
tarex / snippets.php
Created August 24, 2012 16:51
laravel authentication , remember me
<?php
// if you need the strtolower or some other data tweaks.
// remember me
$remember = Input::get('remember');
$credentials = array(
'username' => strtolower(Input::get('email')­),
'password' => Input::get('password'),
@tarex
tarex / gist:3436953
Created August 23, 2012 14:04 — forked from thehydroimpulse/gist:2872907
A Laravel task generator. Models, Migrations and Controllers.
<?php
/**
* @copyright 2012 TheHydroImpulse, Daniel Fagnan
* @version 0.1
* @todo Add an overwite ability. Among other things.
* @note Use this as you wish. Extend it, Mash it. Enjoy it.
*/
@tarex
tarex / Custom.css
Created August 16, 2012 08:17 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*