Skip to content

Instantly share code, notes, and snippets.

View jojojojojoj5564656465465's full-sized avatar

JONATHAN jojojojojoj5564656465465

View GitHub Profile
@pksunkara
pksunkara / config
Last active July 21, 2024 22:19
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@tabrindle
tabrindle / webp-convert-directory.sh
Last active June 15, 2024 07:55
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)
@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') {