Skip to content

Instantly share code, notes, and snippets.

View dayaki's full-sized avatar
🏠
Working from home

Dayo Akinkuowo dayaki

🏠
Working from home
View GitHub Profile
@dayaki
dayaki / home.html
Created November 29, 2019 21:01
paypal integration
<ion-header>
<ion-navbar>
<ion-title>High Wycombe Mosque</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="page-home">
<p class="title">{{ islamicDate }}</p>
<ion-list class="home-list" *ngIf="prayerTimes !== null" no-margin>
<ion-item no-lines>
@dayaki
dayaki / mongoose_tips.js
Last active April 23, 2021 21:10
Mongoose Tips
// compare mongoose id
user._id.toString() === request.params.id
// comparing mongoose ids and strings
first._id.equals(another._id)
@dayaki
dayaki / index.js
Last active June 29, 2022 07:17
Blockli template file
import React from "react";
import { NativeModules } from "react-native";
const { RNCustomCode } = NativeModules;
// Import needed Blockli Blocks here
import {
initialize,
BlockliVideo,
} from "@blocklienterprise/blockli";
import config from "@src/build_config.json";
@dayaki
dayaki / reset.js
Created July 21, 2022 13:22
Reset a variable daily
let myVar = 10;
function scheduleReset() {
// get current time
let reset = new Date();
// update the Hours, mins, secs to the 24th hour (which is when the next day starts)
reset.setHours(24, 0, 0, 0);
// calc amount of time until restart
let t = reset.getTime() - Date.now();
setTimeout(function() {