Skip to content

Instantly share code, notes, and snippets.

@sixtusagbo
sixtusagbo / .env
Last active April 29, 2023 16:33
Here are the locations of Laravel env variables as of the current version right now. It can change in the future, though I doubt that yet.
APP_ENV=local
APP_DEBUG=true -> 'debug' on config/app.php
APP_KEY=my_key -> 'key' on config/app.php
// all these on config/database.php
DB_HOST=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
if !has('nvim')
" Vundle
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
@sixtusagbo
sixtusagbo / articles.py
Last active November 11, 2022 01:43
Count how many articles in a string in python
#!/usr/bin/python3
"""
Module that counts number of articles in a string
"""
def filter_articles(text):
"""Count how many articles (a, an, the) in a string
Args:
@sixtusagbo
sixtusagbo / apt-key_deprecated_fix.sh
Last active November 11, 2022 01:31
Fix 'apt-key' depreciated in linux
sudo apt-key export 038651BD | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/slacktechnologies.gpg
# Replace 038651BD with the last 8 characters of your key
# Relace slacktechologies with a name that applies to your app or key
@sixtusagbo
sixtusagbo / The Four P's.md
Last active May 30, 2022 12:04
problem solving

The Four P's of Problem Solving

Prepare

  • Diagnose the problem
  • Look for solution
  • Look for tools

Plan

  • Note your solutions by using pseudo code
@sixtusagbo
sixtusagbo / embed_html.php
Last active February 8, 2022 22:08
HTML embedding in PHP if, elseif, and else conditionals
<?php if($condition): ?>
<h1>Some Html</h1>
<?php elseif($otherCondition): ?>
<h1>Some Html</h1>
<?php else: ?>
<h1>Some Html</h1>
<?php endif; ?>
@sixtusagbo
sixtusagbo / nigerian_banks.html
Created February 7, 2022 03:43
Nigerian Banks Select Drop down as at 2022
<select>
<option selected disabled>Choose Bank</option>
<option value="Kuda Bank">Kuda Bank</option>
<option value="Access Bank">Access Bank</option>
<option value="Citibank">Citibank</option>
<option value="Eco Bank">Ecobank</option>
<option value="FCMB">First City Monument Bank (FCMB)</option>
<option value="Fidelity Bank">Fidelity Bank</option>
<option value="First Bank">First Bank</option>
<option value="GTB">Guaranty Trust Bank (GTB)</option>