Skip to content

Instantly share code, notes, and snippets.

View emmanuelkiranr's full-sized avatar

Emmanuel Kiran R emmanuelkiranr

View GitHub Profile
@emmanuelkiranr
emmanuelkiranr / icons.svg.xml
Last active November 1, 2025 08:16
SVG sprite file with essential icons for web interfaces
<!-- Example usage in HTML: <use href="/path_to_file/icons.svg#<symbol_id>" />
<svg width="18" height="18">
<use href="/assets/svgs/icons.svg#location" />
</svg>
#location - id attribute of the symbol, to be rendered.
-->
<svg xmlns="http://www.w3.org/2000/svg">
<!-- icons -->
@emmanuelkiranr
emmanuelkiranr / global-resets.css
Created November 1, 2025 06:45
Minimal CSS reset for consistent cross-browser styling
*,
*::after,
*::before {
box-sizing: border-box;
}
* {
margin: 0;
}
@emmanuelkiranr
emmanuelkiranr / use-fetch.ts
Created October 31, 2025 07:00
A type safe custom Fetch API hook for react
// implementation example here: https://github.com/emmanuelkiranr/DevSandbox
const BASE_URL = `https://jsonplaceholder.typicode.com/`
export class HttpError extends Error {
status: number
constructor(status: number, message: string) {
super(message)
this.name = 'Error'
this.status = status