Skip to content

Instantly share code, notes, and snippets.

View ayoisaiah's full-sized avatar
💪
Getting after it

Ayooluwa Isaiah ayoisaiah

💪
Getting after it
View GitHub Profile
@ayoisaiah
ayoisaiah / main.js
Last active August 3, 2020 16:34
Pomodoro Tutorial — Checkpoint 4
const timer = {
pomodoro: 25,
shortBreak: 5,
longBreak: 15,
longBreakInterval: 4,
sessions: 0,
};
let interval;
@ayoisaiah
ayoisaiah / main.js
Last active August 3, 2020 16:34
Pomodoro Tutorial — Checkpoint 3
const timer = {
pomodoro: 25,
shortBreak: 5,
longBreak: 15,
longBreakInterval: 4,
};
let interval;
const mainButton = document.getElementById('js-btn');
@ayoisaiah
ayoisaiah / main.js
Created August 3, 2020 16:17
Pomodoro Tutorial — Checkpoint 2
const timer = {
pomodoro: 25,
shortBreak: 5,
longBreak: 15,
longBreakInterval: 4,
};
let interval;
const mainButton = document.getElementById('js-btn');
@ayoisaiah
ayoisaiah / main.js
Last active December 6, 2023 16:46
Pomodoro Tutorial — Checkpoint 1
const timer = {
pomodoro: 25,
shortBreak: 5,
longBreak: 15,
longBreakInterval: 4,
};
const modeButtons = document.querySelector('#js-mode-buttons');
modeButtons.addEventListener('click', handleMode);
!Name: Gosper glider gun
!Author: Bill Gosper
!The first known gun and the first known finite pattern with unbounded growth.
!www.conwaylife.com/wiki/index.php?title=Gosper_glider_gun
........................O
......................O.O
............OO......OO............OO
...........O...O....OO............OO
OO........O.....O...OO
OO........O...O.OO....O.O
Size Signed Unsigned
8-bit int8 uint8
16-bit int16 uint16
32-bit int32 uint32
64-bit int64 uint64
// src/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { NbThemeModule, NbChatModule, NbLayoutModule } from '@nebular/theme';
import { NbEvaIconsModule } from '@nebular/eva-icons';
import { AppRoutingModule } from './app-routing.module';
<nb-layout center>
<nb-layout-column>
<div *ngIf="!channel">
Loading...
</div>
<nb-chat size="large" *ngIf="channel" title="Stream Chat Angular">
<nb-chat-message
*ngFor="let msg of messages"
[message]="msg.text"
[sender]="msg.user.name"
import { Component, OnInit } from '@angular/core';
import { StreamChat, ChannelData, Message, User } from 'stream-chat';
import rug from 'random-username-generator';
import axios from 'axios';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
@ayoisaiah
ayoisaiah / index.js
Last active May 7, 2020 07:50
index.js
require("dotenv").config();
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const { StreamChat } = require("stream-chat");
const app = express();
app.use(cors());