Skip to content

Instantly share code, notes, and snippets.

View coolsam726's full-sized avatar

Sam Maosa coolsam726

View GitHub Profile
@coolsam726
coolsam726 / INTERVIEW.md
Last active October 8, 2024 11:06
SU - 2024 Q3 EAS INTERNSHIP CODING CHALLENGE

File Management System - Interview Coding Challenge

Description

The aim of this exercise is to implement a simple file management system. The system should be able to create files, delete files, and list all files in the system. The system should also be able to handle errors such as trying to delete a file that does not exist. All files should be organized into nested directories. The system should be able to create directories, delete directories, and list all directories in the system. The system should also be able to handle errors such as trying to delete a directory that is not empty.

Instructions

  1. Your project should have two apps: the Frontend and the backend.
  2. The backend should be implemented in any of the following languages:
    • Python (Django Framework)
  • Java (Spring Boot Framework)
@coolsam726
coolsam726 / app.js
Created August 21, 2023 07:17 — forked from saineshmamgain/app.js
Setting up laravel-websockets on production server using nginx proxy with letsencrypt ssl
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
wsHost: window.location.host,
wsPort: 80,
wssPort: 443,
disableStats: true,
enabledTransports: ['ws', 'wss'],
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
});
@coolsam726
coolsam726 / PrimeDatatables.vue
Last active May 10, 2024 08:28
A fully functional Vue component to work with savannabits/primevue-datatables package (Works with tailwindcss and Vue.js 3.x). NB: The usage example is based on savannabits/acacia, a backend generator I developed to make your life easier by generating code for the backend CRUDs. You can flesh out the unnecessary parts to remain with the bare-bon…
<template>
<DataTable
class="p-datatable-sm"
:value="records"
:lazy="true"
:auto-layout="true"
:paginator="true"
:rows="10"
v-model:filters="filters"
ref="dt"
@coolsam726
coolsam726 / CountriesSeeder.php
Created December 8, 2021 13:04
The World's Countries Laravel Seeder
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
@coolsam726
coolsam726 / CountiesSeeder.php
Created December 8, 2021 13:02
Kenya Counties Laravel Seeder
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class CountiesSeeder extends Seeder
{
/**
* Run the database seeds.
@coolsam726
coolsam726 / 2021_05_04_093648_create_blocked_email_domains_table.php
Created May 4, 2021 10:37
Laravel 8 and PHP 8.0 Migration and Seeder for 8k+ Free Email Provider Domains (In case you want to block non-corporate email domains)
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBlockedEmailDomainsTable extends Migration
{
/**
* Run the migrations.