Skip to content

Instantly share code, notes, and snippets.

View camara90100's full-sized avatar
🏠
Working from home

Mustafa Eid camara90100

🏠
Working from home
View GitHub Profile
const camelCaseToKebabCase = (value) => {
if (typeof value !== 'string') return value
return value.replace(/[A-Z]/g, (char, index, wholeValue) => {
return wholeValue[index] = `${index === 0 ? '' : '-'}${char.toLowerCase()}`
})
}
const getStyles = (element) => {
const elementStyles = {}
@jefftriplett
jefftriplett / magic-link.py
Last active April 5, 2021 09:29
Django Management Command to print a "Magic Link" for one-click log-in. This is nice for people who project switch or don't want to remember passwords.