Skip to content

Instantly share code, notes, and snippets.

View dimeloper's full-sized avatar
🎯
Focusing

Dimitris Kiriakakis dimeloper

🎯
Focusing
View GitHub Profile
async subscribeToUnreadMessagesChanges(userId: string, onChange: (change: boolean) => void) {
const watch = await this.roomRepository.watchByUserId(userId);
watch.on('change', (change) => {
onChange(
change.fullDocument?.content &&
!change.fullDocument?.read &&
change.fullDocument?.last_sender_id !== userId,
);
});
.heart {
animation: heartbeat 1s infinite; // our heart has infinite heartbeat :)
...
}
@keyframes heartbeat {
0% {
transform: scale( 1 );
}
20% {
transform: scale( 1.25 )
translateX(5%)
translateY(5%);
}
40% {
.heart {
background-color: red;
display: inline-block;
height: 50px;
margin: 0 10px;
position: relative;
top: 0;
transform: rotate(-45deg);
position: absolute;
left: 45%; top: 45%;