Skip to content

Instantly share code, notes, and snippets.

View iLTW1n's full-sized avatar
🚀
work hard | play hard

José Oscátegui iLTW1n

🚀
work hard | play hard
View GitHub Profile
@rcanepa
rcanepa / routes.js
Last active March 2, 2023 08:29
Private routes with React Router v4
function PrivateRoute ({component: Component, authenticated, ...rest}) {
return (
<Route
{...rest}
render={(props) => authenticated === true
? <Component {...props} />
: <Redirect to={{pathname: '/login', state: {from: props.location}}} />}
/>
)
}
@robphoenix
robphoenix / spacemacs-cheshe.md
Last active February 6, 2024 23:11
[DEPRECATED] Spacemacs Cheat Sheet - Visit https://github.com/Ben-PH/spacemacs-cheatsheet

This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window