Skip to content

Instantly share code, notes, and snippets.

View thovden's full-sized avatar

Torgeir Hovden thovden

View GitHub Profile
const useStyles = makeStyles(() => ({
root: {
overflowY: 'auto',
flex: 1,
maxHeight: '400px',
}
}))
const TodoList: FC<TodoProps> = props => {
const { className, items = [], title = 'Todo', onUpdate } = props
@thovden
thovden / gist:b4d67942fc23880a7957
Created March 27, 2015 12:53
loopback-component-passport to allow accessToken to propagate to an AngularJS app running on another domain (TLS).
if (info && info.accessToken) {
if (!!options.json) {
return res.json({'access_token': info.accessToken.id, userId: user.id});
} else {
res.cookie('access_token', info.accessToken.id, { signed: req.signedCookies ? true : false,
maxAge: 1000 * info.accessToken.ttl });
res.cookie('userId', user.id.toString(), { signed: req.signedCookies ? true : false,
maxAge: 1000 * info.accessToken.ttl });
}
}
Verifying that +torgeir is my openname (Bitcoin username). https://onename.com/torgeir