Skip to content

Instantly share code, notes, and snippets.

View prodeveloper's full-sized avatar

Jacob Chencha prodeveloper

View GitHub Profile
@prodeveloper
prodeveloper / pspell.php
Created October 13, 2014 09:44
PSpell Configuration File
<?php
return [
/**
* his function determines whether run-together words will be treated as legal
* compounds. That is, "thecat" will be a legal compound, although there should be
* a space between the two words
*/
'run_together'=>false,
/**
* Set a file that contains replacement pairs.
@prodeveloper
prodeveloper / output.json
Created October 15, 2014 23:16
Laravel-4-Decorators-Tutorials
{
"0": {
"worker_details": {
"role": "quia",
"name": "Shaun Leuschke"
}
},
"1": {
"worker_details": {
"role": "quis",
/**
* Ofcos the classes should be in different files
* Assumes you are using a command bus to raise events I happen to love Jeff Way https://github.com/laracasts/Commander
*
* With this architecture you don't need to modify any existing classes for new headers just add a new class and should work
*
* More than one class can handle the requests
*/
class CommitComment extends GithubRequest {
<?php
namespace Chencha\Autosuggest\Validators;
use Chencha\Autosuggest\Exceptions\PspellIsNotInstalled;
class CheckPspellIsInstalled {
function __construct()
@prodeveloper
prodeveloper / GetAllColumns.php
Created November 7, 2014 09:48
Get All Columns
<?php
namespace Model\Processors;
use DB;
/**
* Class GetAllColumns
* @package Model\Processors
* - See more at: http://laravelsnippets.com/snippets/get-all-columns-names-from-a-eloquent-model#sthash.wgqPKvG9.dpuf
*/
trait GetAllColumns
{
/(")([\s\S]*?)("[\s\S]*?",)/g
@prodeveloper
prodeveloper / sample_registration.py
Created February 22, 2016 08:19
Organizing python code
#!/usr/bin/env python
# encoding: utf-8
# Code in your services folder
class StoreInDb():
def run(data):
StoreInDb.storeLogic(data)
data['db_status'] = "User stored in database"
@prodeveloper
prodeveloper / tbl_day.php
Created March 8, 2016 15:52
Days and months example
<table border="1">
<!--Table headers -->
<tr>
<td>Months</td>
<td>Days</td>
<td>Last day</td>
</tr>
<?php
@prodeveloper
prodeveloper / dependency.php
Created April 18, 2016 17:36
Circular dependancy
<?php
php artisan make:migration create_students_table --create=students

Navigate to the database/migrations folder and select your file

Add the following lines to the code

            $table->string('name');