Skip to content

Instantly share code, notes, and snippets.

View walosha's full-sized avatar
💭
Available for Hire

Olawale Afuye walosha

💭
Available for Hire
View GitHub Profile
@walosha
walosha / awsCopyPaste.txt
Created March 22, 2025 22:54 — forked from RivaanRanawat/awsCopyPaste.txt
All AWS Copy Paste material related to the video tutorial
AWS SQS Queue Access Policy to Store data to S3 RAW VIDEOS:
{
"Version": "2012-10-17",
"Id": "__default_policy_ID",
"Statement": [
// existing data... add the statement below
{
"Effect": "Allow",
"Principal": {
@walosha
walosha / app.js
Created January 28, 2025 06:37 — forked from prof3ssorSt3v3/app.js
Introduction to Service Workers code from video
const APP = {
SW: null,
init() {
//called after DOMContentLoaded
if ('serviceWorker' in navigator) {
// 1. Register a service worker hosted at the root of the
// site using the default scope.
navigator.serviceWorker
.register('/sw.js', {
scope: '/',
// SIGN UP
// const { mutate: signUp } = trpc.user.signup.useMutation({
// onError: (e) => {
// console.log("Error===>", e);
// // showAlert(res?.message, 'error');
// },
// onSuccess: () => {
// console.log("success");
// // showAlert('Corporate Admin successfully set', 'success');
You can use Axios interceptors to automatically append the bearer token from local storage to all outgoing requests. Here's how you can set it up:
```javascript
import axios from 'axios';
// Create an instance of axios
const axiosInstance = axios.create();
// Add a request interceptor
axiosInstance.interceptors.request.use(
class PayeCalculator {
constructor(basicSalary, housingAllowance, transportAllowance, otherAllowance) {
this.basicSalary = basicSalary;
this.housingAllowance = housingAllowance;
this.transportAllowance = transportAllowance;
this.otherAllowance = otherAllowance;
}
calculatePension() {
const grossIncome = this.basicSalary + this.housingAllowance + this.transportAllowance + this.otherAllowance;
import { HttpException, HttpStatus, Logger } from "@nestjs/common";
import axios from "./client";
import {
handleErrorResponse,
handleSuccessResponse,
} from "@/utils/handleError";
import { Wallet } from "@/modules/wallet/entity/wallet.entity";
import { InjectRepository } from "@nestjs/typeorm";
import { Repository } from "typeorm";
import { UserInfo } from "@/modules/user/entity/user.entity";
{
billResponse: {
status: '00',
message: 'Successfull',
wallet_balance: 14411.77,
order: 'GOtv Lite N1,400 to 8059920770. ',
ref: '231117928264',
response_hash: '9fff70a3d8ab1ba1b3464c2556645b54aa3098c1'
}
}
@walosha
walosha / accounting.sql
Created October 14, 2023 22:56 — forked from NYKevin/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...

Firebase Setup For House Marketplace

  1. Create Firebase Project
  2. Create "web" app within firebase to get config values"
  3. Install firebase in your project "npm i firebase
  4. Create a config file in your project
  5. Add authentication for email/password and Google
  6. Create a user from Firebase
  7. Enable Firestore
  8. Add rules for firestore
@walosha
walosha / ssh.md
Created December 28, 2022 02:03 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test