Skip to content

Instantly share code, notes, and snippets.

View Thirdwrist's full-sized avatar
🎯
Focusing

0x Thirdwrist

🎯
Focusing
  • Remote
View GitHub Profile
$str = "The lazy dog jumped over the fox";
function using_recursion($val) {
$posRes = strrpos($val, ' ');
if ($posRes !== FALSE) {
echo substr($val, $posRes);
using_recursion(substr($val, 0, $posRes));
}
else {
echo " $val";
<?php
namespace Illuminate\Database;
use PDO;
use Closure;
use Exception;
use PDOStatement;
use LogicException;
use DateTimeInterface;
DirectoryIndex index.html index.php
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# If installed in local or under a path say /getteachrfarid /: (otherwise, doesn't need RewriteBase)
RewriteBase /
RewriteRule ^(docs)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
@Thirdwrist
Thirdwrist / gist:8fb073784fcddd580b1d9247d6a73ccf
Created May 12, 2020 06:57
[Flutterwave] List of power vending discos
{
"Id": 267,
"BillerCode": "BIL112",
"Name": "EKO DISCO ELECTRICITY BILLS FOR PREPAID CLIENTS",
"DefaultCommission": 0.3,
"DateAdded": "2020-02-11T11:09:48.087Z",
"Country": "NG",
"IsAirtime": false,
"BillerName": "EKEDC PREPAID TOPUP",
"ItemCode": "UB157",
@Thirdwrist
Thirdwrist / How to create symlinks in shared hosting for laravel storage folder
Last active March 13, 2019 15:16
Just add this to a file and run it, for example add it to a callback web route and hi the route, and the magic happens
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build:
docker:
# Specify the version you desire here
- image: circleci/php:7.1-jessie-node-browsers
/*
This works fine in PHP
*/
$value = "bob";
$value = 2;
$value = true;
/*
This will throw an error as the variable has
@Thirdwrist
Thirdwrist / Passing data to mail in laravel.md
Last active March 15, 2018 01:12
How to pass data to mail in Laravel 5

A couple of times when I had to write an application on laravel 5 and I have to send a mail, almost every single time I run into issues passing data to my mail views, and I have to go back to my old codes to find out How I passed data previously, after doing this again a couple of days I decided to document it, might help someone too.

The way to go about this is to inject an instance of a model while instantiating the send mail class. like so:

 public static function clientSendUserMail($Request, $id){