Skip to content

Instantly share code, notes, and snippets.

View 50-Course's full-sized avatar
🏠
Working from home

Eri A. 50-Course

🏠
Working from home
View GitHub Profile
@50-Course
50-Course / schema.json
Created August 7, 2024 21:37
OpenAPI doc - superpool, for postman
{
"openapi": "3.0.3",
"info": {
"title": "Superpool API",
"version": "0.1.0",
"description": "API for Superpool",
"contact": {
"name": "Unyte Africa LTD.",
"url": "https://ng.unyte.africa",
"email": "[email protected]"
@50-Course
50-Course / latency.txt
Created May 3, 2024 01:00 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@50-Course
50-Course / CW.cpp
Created November 13, 2023 17:21
Working with threads, mutexes and Semaphores
// main.cpp : Defines the entry point for the console application.
// My name: My student id:
// ------------------------------------------
// Helpful Notes
//
// - At any given moment, only two taxis can commute on a bridge simultaneously
// due to its two-track structure
// - Max. of 4 passengers is allowed on a taxi trip
//
@50-Course
50-Course / init.lua
Created November 12, 2023 23:44
LSP Configuration source
local cmp = require("cmp")
local capabalities = vim.lsp.protocol.make_client_capabilities()
capabalities = require("cmp_nvim_lsp").default_capabilities(capabalities)
local mason = require("mason")
local mason_lspconfig = require("mason-lspconfig")
cmp.setup({
snippet = {
@50-Course
50-Course / utils.lua
Created November 12, 2023 23:43
LSP Configuration source
--- Utility functions to aid development of other modules
---
--- @module utils
local M = {}
function M.get_file_extension(path)
return path:match("^.+(%..+)$")
end
function M.get_file_name(path)
@50-Course
50-Course / keymaps.lua
Created October 30, 2023 12:03
LSP Keymaps passed exported as a module and passed into `on_attach` function
--- Defines the bindings for various operations performed by the LSP with combination of
--- chords.
local map = require('utils').remap
local M = {}
M.on_attach = function(client, bufnr)
client = client
buffer = bufnr
@50-Course
50-Course / init.lua.save
Created October 18, 2023 10:04
self-contained vimrc configuration
-- This configuration file is licensed under the MIT License
-- The user (You) is permitted to modfiy, use or re-distribute the configuration
-- file as he/she/they/them/other see pleased.
--
-- It would be nice, if you could mention the author. Thanks!
-- Global configuration
--
-- :h <options> would give you the options
@50-Course
50-Course / cdn.md
Created March 14, 2023 09:52 — forked from jcubic/cdn.md
How to setup a literally free CDN