Skip to content

Instantly share code, notes, and snippets.

View joekenpat's full-sized avatar
🚀
Moonshooting

Patrick Joel joekenpat

🚀
Moonshooting
View GitHub Profile
version: '3.8'
services:
db:
image: postgres:14.1-alpine
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- '5432:5432'
<?php
class Order
{
/** @var int */
private $id;
/** @var OrderItem[] */
private $orderedItems = [];
@joekenpat
joekenpat / import_and_use_font_in_css.css
Created July 8, 2021 19:56
How to import and use font in a css file
/* this css function used to import a font */
@font-face {
/* This is the link to the font: can be relative, abosolute, or remote url*/
src: url("../fonts/choice.ttf");
/* set the name of the font family */
font-family: choice;
}
.new_font_paragragh{
/* set the font name as the font family */
@joekenpat
joekenpat / handle_paystack_payment_callback.php
Created June 16, 2021 08:58
Handle paystack payment callback with Laravel Http
/**
* Obtain Paystack payment information
* @return void
*/
public function handleUserFeeViaPaystackCallback(Request $request)
{
//Instantiate Laravel Http get request to Paystack Veryify API route
//passing paystack secret key as Bearer token.
$paystack_client = Http::withToken(config('paystack.secretKey'))
//----------------------------------------------> attach the transaction ref from the request URl
@joekenpat
joekenpat / paystack_create_charge_with laravel_http.php
Created June 16, 2021 08:49
Create a new Paystack charge using Laravel Http Request
public function userPayFeeViaPaystack()
{
//instantiate Laravel Http Client and pass paystack secret key as a bearer token
$paystack = Http::withToken(config('paystack.secretKey'))
->post('https://api.paystack.co/transaction/initialize', [
//email for the user making the payments
'email' => 'john@doe.com,
//amount must be in kobo hence: the multiplication by 100
'amount' => 1500 * 100,
'quantity' => 1,
@joekenpat
joekenpat / content_with_timeline.html
Created June 8, 2021 17:13
Simple Timeline with Html and css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple Timeline with Html and css</title>
<style>
.indicator-icon {
border-radius: 50%;
width: 1rem;