Skip to content

Instantly share code, notes, and snippets.

View Angeloem's full-sized avatar
🎯
Focusing

Sanga Manuel Angeloem

🎯
Focusing
  • Tanzania
View GitHub Profile
@Bonny-kato
Bonny-kato / HeadlessDatePicker Component with Month Navigation.md
Last active January 11, 2024 19:31
The code snippet defines a HeadlessDatePicker component that displays a calendar. It uses the dayjs library to get the current month and year, and generates an array representing the days of the month. The component allows the user to navigate to the previous or

HeadlessDatePicker Component with Month Navigation

Preview:
import * as dayjs from "dayjs";
import { Dayjs } from "dayjs";
import { useEffect, useState } from "react";

export const getMonth = (month = dayjs().month()) => {
    const year = dayjs().year();
    const firstDayOfMonth = dayjs(new Date(year, month, 1)).day();
import 'package:flutter/material.dart';
class FadeIndexedStack extends StatefulWidget {
final int index;
final List<Widget> children;
final Duration duration;
const FadeIndexedStack({
Key key,
this.index,
@kocisov
kocisov / next_nginx.md
Last active June 10, 2024 19:45
How to setup next.js app on nginx with letsencrypt
@maephisto
maephisto / Javascript ISO country code to country name conversion
Last active November 3, 2023 21:05
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',