Skip to content

Instantly share code, notes, and snippets.

View charafmrah's full-sized avatar
🏗️
Building

Charaf Mrah charafmrah

🏗️
Building
View GitHub Profile
<div id="starfield" class="absolute inset-0">
<canvas id="starfield-canvas"></canvas>
</div>
<script>
import invariant from "tiny-invariant";
const COUNT = 800;
const SPEED = 0.1;
@charafmrah
charafmrah / loading-spinner.css
Last active February 12, 2023 03:24
Animated loading spinner
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
@charafmrah
charafmrah / eggOrChicken.java
Last active September 1, 2021 12:11
Which one came first, the egg or chicken? answered using code
import java.util.Arrays;
//which one came first the egg or the chicken? well this is java's solution:
public class eggOrChicken {
public static void main(String[] args) {
String[] x = {"🥚", "🐓"};
Arrays.sort(x);