Skip to content

Instantly share code, notes, and snippets.

View jfamousket's full-sized avatar
🎯
Focusing

Famous jfamousket

🎯
Focusing
View GitHub Profile
@jfamousket
jfamousket / go_tips.md
Created October 14, 2021 08:45
Golang Tips

serve JSON http response

rw.Header().Set("Content-Type", "application/json")

json.NewEncoder(rw).Encode(struct{ Status int json:"status" }{ Status: http.StatusOk })

@jfamousket
jfamousket / AVR_assembly_programming.md
Last active December 18, 2020 13:51
AVR Assembly Programming CheatSheet

Registers:

CPU uses registers to store data temporairly. Most AVRs have 8 bit registers. Two kinds of registers. The General Purpose Registers(GPRs) & I/O registers.

GPRs:

ARVs have 32 general purpose registers. They are R0 to R31. And located in the lowers location of memory address($0000 to $001F). They can be used by all arithmatic and logical instructions.

I/O Registers:

@jfamousket
jfamousket / sp
Created June 19, 2020 16:01 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@jfamousket
jfamousket / compilation.md
Last active January 26, 2020 19:24
[React Libraries Compilation] Some useful react libraries and components #react
@jfamousket
jfamousket / typed_use_reducer.ts
Last active January 26, 2020 19:19
A strongly typed useReducer hook allowing you to use setState as used in react classed based components
/**
* Mimic set state function of react
* @param prevState
* @param property
*/
type TypedReducer<T> = (
prevState: T,
property: { [K in keyof T]?: T[K] }
) => T;