I hereby claim:
- I am scsskid on github.
- I am scsskid (https://keybase.io/scsskid) on keybase.
- I have a public key ASCcp5anr3F3NE5NpFCCBxsrWTiLEN71zRCdc5QVXas0Wwo
To claim this, I am signing this object:
function appHeight() { | |
document.documentElement.style.setProperty( | |
'--vh', | |
window.innerHeight * 0.01 + 'px' | |
); | |
} | |
React.useEffect(() => { | |
// window.addEventListener('resize', appHeight); | |
// appHeight(); |
function useLocalStorageState( | |
key, | |
defaultValue = '', | |
{ serialize = JSON.stringify, deserialize = JSON.parse } = {} | |
) { | |
const [state, setState] = React.useState(() => { | |
const valueInLocalStorage = window.localStorage.getItem(key); | |
if (valueInLocalStorage) { | |
return deserialize(valueInLocalStorage); |
// Elegant Composition | |
const UnorderedList = ({children}) => ( | |
<ul> | |
{ | |
children.map((child, i) => <li key={i}>{child}</li> | |
} | |
</ul> | |
) | |
const App = () => ( |
/* | |
# Only connect to this site and subdomains via HTTPS for the next one year | |
Strict-Transport-Security: max-age=31536000; includeSubDomains | |
# Block site from being framed with X-Frame-Options and CSP | |
Content-Security-Policy: frame-ancestors 'self' | |
# X-Frame-Options tells the browser whether you want to allow your site to be framed or not. By preventing a browser from framing your site you can defend against attacks like clickjacking. | |
X-Frame-Options: SAMEORIGIN |
I hereby claim:
To claim this, I am signing this object:
return ` | |
<pre> | |
<code>${JSON.stringify(props, null, 4)}</code> | |
</pre> | |
` |
rm -R ~/Library/Application\ Support/RightFont |
defaults write com.apple.dock autohide-delay -float 0; killall Dock |
const date = new Date(); | |
date = (date.getDay() + 6) % 7 | |
// src: https://stackoverflow.com/a/24481597/2823589 |