Skip to content

Instantly share code, notes, and snippets.

View gmann1982's full-sized avatar

George Rome gmann1982

  • Stoke On Trent, England
View GitHub Profile
@gmann1982
gmann1982 / csv import sample
Created April 10, 2013 13:37
csv import sample
ini_set('auto_detect_line_endings', true);
$csvFile = Input::file('csvfile');
$uploadDir = path('public').'/uploads/data/prospects';
$filename = $csvFile['name'];
Input::upload('csvfile', $uploadDir, $filename);
$handle = fopen($uploadDir.'/'.$filename, "r");
@gmann1982
gmann1982 / laravel 4 alias
Created April 29, 2013 17:51
laravel 4 generator alias
alias art='php artisan'
alias g:c='art generate:controller'
alias g:f='art generate:form'
alias g:mig='art generate:migration'
alias g:mod='art generate:model'
alias g:r='art generate:resource'
alias g:sca='art generate:scaffold'
alias g:seed='art generate:seed'
alias g:v='art generate:view'
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
@gmann1982
gmann1982 / datatables
Created June 10, 2013 11:55
datatables
<?php namespace Bllim\Datatables;
/**
* Laravel Datatable Bundle
*
* This bundle is created to handle server-side works of DataTables Jquery Plugin (http://datatables.net)
*
* @package Laravel
* @category Bundle
* @version 1.3
@gmann1982
gmann1982 / sql insert
Created July 3, 2013 11:22
sql insert
INSERT INTO `pages` (`id`, `domain_id`, `innav`, `anchor`, `permalink`, `title`, `keywords`, `description`, `layout_id`, `created_at`, `updated_at`, `page_content`)
VALUES
(14, 1, 1, 'Home', '/', 'windermere B And B', 'windermere, b and b', 'widermere b and b etc ...', 2, '2013-06-28 13:25:40', '2013-06-28 13:25:40', '<div class=\"row-fluid\">\r\n<div class=\"span6\">\r\n<p>windermere home page</p>\r\n</div>\r\n\r\n<div class=\"span6\"><img src=\"/assets/img/templates/placeholder.jpg\" /></div>\r\n</div>\r\n\r\n<div class=\"row-fluid\">\r\n<div class=\"span6\">\r\n<p>more content</p>\r\n</div>\r\n\r\n<div class=\"span6\"><img src=\"/assets/img/templates/placeholder.jpg\" /></div>\r\n</div>\r\n\r\n<div class=\"row-fluid\">\r\n<div class=\"span6\">\r\n<p>more content</p>\r\n</div>\r\n\r\n<div class=\"span6\"><img src=\"/assets/img/templates/placeholder.jpg\" /></div>\r\n</div>');
@gmann1982
gmann1982 / main config
Created July 4, 2013 13:23
main config
<?php
ini_set('display_errors', 1);
include 'Mobile_Detect.php';
$detect = new Mobile_Detect();
require_once('php-activerecord/ActiveRecord.php');
@gmann1982
gmann1982 / mobile config
Created July 4, 2013 13:24
mobile config
<?php
ini_set('display_errors', 1);
require_once('../php-activerecord/ActiveRecord.php');
// require_once '../vendor/autoload.php';
define('BASEDIR', dirname(__file__));
//define('BASEURL', str_replace('m.', 'www.', $_SERVER['SERVER_NAME']));
@gmann1982
gmann1982 / my zsh config
Created July 24, 2013 16:50
my zsh config
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
alias ukfast='ssh [email protected] -p 2020'
alias ovh1='ssh [email protected]'
alias zshconfig="vim ~/.zshrc"
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
@gmann1982
gmann1982 / terminal theme
Created July 24, 2013 16:54
terminal theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@gmann1982
gmann1982 / database config
Created July 24, 2013 18:09
database config
<?php
return array(
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP