Skip to content

Instantly share code, notes, and snippets.

View sixtusagbo's full-sized avatar
🏡
Working from home

Sixtus Miracle Agbo sixtusagbo

🏡
Working from home
View GitHub Profile
@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>
@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 / 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 / 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 / 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:
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 / .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=
@sixtusagbo
sixtusagbo / tmux-cheatsheet.markdown
Created June 9, 2023 05:44 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sixtusagbo
sixtusagbo / README.md
Created July 6, 2023 09:56 — forked from twolfson/README.md
Python unittest `setUp` inheritance

In some cases for Python unit tests, we want to automatically perform setUp methods in as declared in a base class. However, we still want setUp to work as per normal in the subclass. The following code will proxy the new setUp function to run it's base class' and the new one.

# Define a common test base for starting servers
class MyBaseTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        """On inherited classes, run our `setUp` method"""
        # Inspired via http://stackoverflow.com/questions/1323455/python-unit-test-with-base-and-sub-class/17696807#17696807
        if cls is not MyBaseTestCase and cls.setUp is not MyBaseTestCase.setUp:
@sixtusagbo
sixtusagbo / variables.c
Last active July 23, 2023 21:42
signed vs unsigned in C
#include <stdio.h>
/**
* main - Entry point
*
* Return: Always (0)
*/
int main(void)
{
unsigned int num_one = 3;