Skip to content

Instantly share code, notes, and snippets.


fokosun fokosun

Block or report user

Report or block fokosun

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
fokosun / watermelon-challenge.php
Last active Aug 26, 2019
watermelon challenge
View watermelon-challenge.php
* both halves have to be divisible by 2
function watermelon($n) {
$ans = array();
if(is_integer($n)) {
$parts = range(1, ($n - 1));
foreach($parts as $part) {
View stock_open_close_price_on_particular_weekdays.php
// 26-March-2001
// 15-August-2001
// Wednesday
// 1-January-2000
// 22-February-2000
// Monday
fokosun / php-calling-class-test.php
Created Jul 9, 2019 — forked from hamstar/php-calling-class-test.php
A function that will return the calling class to the class using it
View php-calling-class-test.php
******* SIMPLE TEST **/
class A {
function t() {
echo get_calling_class();
class B {
fokosun / bWAPP easy setup
Last active Dec 19, 2018
setup bWAPP without WAMP or XAMPP or any Virtual machine
View bWAPP easy setup
Important Note: PHP Version must be < version 5.5 if you are using version 7.0
you will need to use a VM like bee-box so you can have an isolated installation of PHP5.4 installed
Download and install bee-box:
Download bWAPP:
Unzip the downloaded zipped folder
fokosun / index.php
Created Oct 25, 2018 — forked from mchelen/index.php
php check multidimensional array for duplicate values
View index.php
$arrays = array(
fokosun / StatusRepository.php
Created May 19, 2018 — forked from laracasts/StatusRepository.php
Integration Testing Repositories That Use Eloquent (with Codeception)
View StatusRepository.php
<?php namespace Larabook\Statuses;
use Larabook\Users\User;
class StatusRepository {
* Get all statuses associated with a user.
* @param User $user
View User.php
namespace App;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
class User extends Model implements AuthenticatableContract, AuthorizableContract
use Authenticatable, Authorizable;
View create_users_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
* Run the migrations.
* @return void
View web.php
| Application Routes
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
View UserController.php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Hashing\BcryptHasher;
* Class UserController
You can’t perform that action at this time.