Skip to content

Instantly share code, notes, and snippets.

Amo Chohan amochohan

Block or report user

Report or block amochohan

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
@GesJeremie
GesJeremie / EmailExampleTest.php
Created Nov 23, 2015
Email test case for testing emails with Mailtrap.io in Phpunit
View EmailExampleTest.php
<?php
/*
|--------------------------------------------------------------------------
| EmailExampleTest
|--------------------------------------------------------------------------
|
| Email test case for testing emails with Mailtrap.io in Phpunit
|
| Requirements:
| - Laravel 5.1
@josh7weaver
josh7weaver / mysqlBuilder.php
Last active Oct 9, 2018
insert on dup key update BULK
View mysqlBuilder.php
<?php namespace [YOUR NAMESPACE HERE];
use Illuminate\Database\Eloquent\Model;
use Log;
use DB;
class MysqlBuilder {
protected $table;
protected $pdoPlaceholderLimit;
@bryhal
bryhal / gist:4129042
Created Nov 22, 2012
MYSQL: Generate Calendar Table
View gist:4129042
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...
You can’t perform that action at this time.