Skip to content

Instantly share code, notes, and snippets.

@codler
codler / result.html
Created September 9, 2017 08:27
Code in the dark - NordicJS - 2017
<!doctype html>
<style>
* {
margin: 0;
padding: 0;
font-size: 16px;
}
.hejsan {
position:relative;
}
@codler
codler / gist:2f5920c894f241c09935289e821b2bad
Created February 12, 2019 21:21
Privacy Policy of Aktie Block
Privacy Policy
Han Lin Yap built the Aktie Block app as an Ad Supported app. This SERVICE is provided by Han Lin Yap at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Aktie Block unless otherwise defined in this Privacy Policy.
Information Collection and Use
@codler
codler / support.md
Created February 12, 2019 21:30
Support page for Aktie Block

Add a comment below to get support

@codler
codler / useInViewport.tsx
Last active September 11, 2024 07:28
React hook check if element is in viewport
import { useState, useEffect, RefObject, useCallback } from "react";
function isElementInViewport(el: Element) {
var rect = el.getBoundingClientRect();
return (
rect.bottom >= 0 &&
rect.right >= 0 &&
rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.left <= (window.innerWidth || document.documentElement.clientWidth)
@codler
codler / .md
Last active October 12, 2020 10:20

New OS

sudo apt update
sudo apt full-upgrade

Check most used disk usage by folder

sudo du -a / 2>/dev/null | sort -n -r | head -n 20

Save space

sudo apt clean
uname -r
https://stackblitz.com/edit/vitejs-vite-7jecmd?file=vite.config.ts