Skip to content

Instantly share code, notes, and snippets.

View asim-altayb's full-sized avatar
🎯
Focusing

Asim Altayb asim-altayb

🎯
Focusing
View GitHub Profile
<script lang="ts">
import { useIntersectionObserver } from "@vueuse/core";
import { ref, nextTick } from "vue";
function onIdle(cb = () => {}) {
if ("requestIdleCallback" in window) {
window.requestIdleCallback(cb);
} else {
setTimeout(() => {
nextTick(cb);
@devoncarew
devoncarew / main.dart
Last active June 25, 2022 05:39
Fibonacci
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
int i = 20;
print('fibonacci($i) = ${fibonacci(i)}');
}
/// Computes the nth Fibonacci number.