Skip to content

Instantly share code, notes, and snippets.

View wagura-maurice's full-sized avatar
🏠
Working from home

Maurice Wagura wagura-maurice

🏠
Working from home
View GitHub Profile
@wagura-maurice
wagura-maurice / structure.sh
Created September 20, 2023 13:40
script to only create the folder structure and respective .vue and .ts files in the current directory
#!/bin/bash
# Determine file extension for Vue.js with TypeScript
FILE_EXTENSION=".vue"
# Set up the desired project directory structure for Vue
DIRECTORIES=(
"src/assets/images"
"src/assets/styles"
"src/components/common"
@wagura-maurice
wagura-maurice / setup_vue_app.sh
Last active September 20, 2023 13:34
setup vue js app
#!/bin/bash
# Prompt the user for the application name
echo "Enter your application name:"
read APP_NAME
# Determine file extension for Vue.js with TypeScript
FILE_EXTENSION=".vue"
# Initialize the Vite app using the specified name with the Vue TypeScript template
@wagura-maurice
wagura-maurice / postman_installation.md
Created September 9, 2023 15:58 — forked from Akhil-Suresh/postman_installation.md
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@wagura-maurice
wagura-maurice / modify-dom.txt
Created May 1, 2023 21:51 — forked from ahliang85/modify-dom.txt
Chrome Extension - Modify DOM
Background page is kind of like you own mini server - it is a completely isolated page that has nothing to do with pages a user visits. It is used for controlling the rest of extension components as it is always running in background.
Content scripts are pieces of javascript code that are getting injected into actual pages a user visits and can access and modify parent page's DOM.
So to get your extension working you need to remove
<script src="jquery.min.js"></script>
<script src="content.js"></script>
from background page, and inject jquery as a content script either through manifest:
@wagura-maurice
wagura-maurice / USSD_CASE.md
Created October 9, 2022 01:04
USSD logic for rent

PART 1; is what new tenants interact with when they dial our ussd for the first time. is also what existing tenants interact with when applying to new property unit tenancy.

(*) NEW TENANCY MENU
    [INPUT] PROPERTY UNIT CODE
    [SELECTION] CONFIRMATION
        1) CONTINUE -> send to tenant onboarding and property unit assigning action
        2) BACK -> send to property unit code input
  1. EXIT -> send to session termination
@wagura-maurice
wagura-maurice / AbstractController.php
Created August 2, 2022 08:19 — forked from dinhquochan/AbstractController.php
Abstract Controller for Laravel (version 8.x)
<?php
namespace App\Http\Controllers;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller as BaseController;
@wagura-maurice
wagura-maurice / AppServiceProvider.php
Created July 18, 2022 12:07 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
[
{
"id": 1,
"pid": "0001",
"name": "door to door",
"description": null,
"deleted_at": null,
"created_at": "2022-05-12T15:06:38.000000Z",
"updated_at": null
},
@wagura-maurice
wagura-maurice / duty_payable.php
Last active July 20, 2021 01:50
estimation of motor vehicle importation costs (including, importation duty payable) in Kenya.
<?php
/**
* A simple PHP function that calculates an estimation cost for car importation into kenya.
*
* @param int $cif This is the customs value of the vehicle i.e. the Cost, Insurance & Freight paid for the vehicle.
* @param int $clearance This is the clearing Agent's sum fee together with some other port handling charges.
* @param int $import_duty This is 25% of the CIF value of the vehicle.
* @param int $excise_duty This is 20% of the (CIF value + Import Duty).
* @param int $vat This is 16% of the (CIF value + Import Duty + Excise Duty).
@wagura-maurice
wagura-maurice / AnyConnect.md5
Created July 2, 2021 10:21
How to Install Cisco VPN AnyConnect Client in Linux, Ubuntu
sudo apt-get istall libpangox-1.0.0 libcanberra-gtk-module -y
https://vpn.nic.in/resources/software/anyconnect-linux64-4.10.01075-k9.tar.gz
sudo ./vpn_install.sh