Skip to content

Instantly share code, notes, and snippets.

View MiloudiMohamed's full-sized avatar
👁️
Console.log('ing')

Miloudi Mohamed MiloudiMohamed

👁️
Console.log('ing')
View GitHub Profile
sudo find /var/lib/caddy/.local/share/caddy/certificates -type f -exec rm {} \;
sudo systemctl restart caddy
@MiloudiMohamed
MiloudiMohamed / API.md
Created February 11, 2020 16:28 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@MiloudiMohamed
MiloudiMohamed / PDO_Cheatsheet.php
Created September 28, 2019 16:33 — forked from hanvari/PDO_Cheatsheet.php
PHP PDO Cheatsheet
<?php
/*
Reference:
http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059
*/
function connect(){
/*
@MiloudiMohamed
MiloudiMohamed / SocialiteMocking.php
Created February 8, 2019 09:19
Socialite mocking script for laravel
<?php
// This is Just a reference for this gist "https://gist.github.com/jlmaners/eb5f9f7bf6ca7f6c3ec02270d9959876" in case it deleted
$mockSocialite = \Mockery::mock('Laravel\Socialite\Contracts\Factory');
$this->app['Laravel\Socialite\Contracts\Factory'] = $mockSocialite;
$abstractUser = Mockery::mock('Laravel\Socialite\Two\User');
$abstractUser
->shouldReceive('getId')
->andReturn(rand())