Skip to content

Instantly share code, notes, and snippets.

View jojojojojoj5564656465465's full-sized avatar

JONATHAN jojojojojoj5564656465465

View GitHub Profile
@Fredkiss3
Fredkiss3 / jsonfetch.ts
Last active August 28, 2022 04:42
JSON FETCH
export async function jsonFetch<T>(
url: string,
options: RequestInit = {}
): Promise<T> {
// Set the default headers correctly
const headers: HeadersInit = new Headers(options.headers);
headers.set('Accept', 'application/json');
headers.set('Content-Type', 'application/json');
if (process.env.NODE_ENV === 'development') {
@tabrindle
tabrindle / webp-convert-directory.sh
Last active November 4, 2024 10:24
Convert all files in directory to webp, with default params, or standard cwebp params passed from command
#!/bin/bash
PARAMS=('-m 6 -q 70 -mt -af -progress')
if [ $# -ne 0 ]; then
PARAMS=$@;
fi
cd $(pwd)
@pksunkara
pksunkara / config
Last active November 15, 2024 16:02
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta