Skip to content

Instantly share code, notes, and snippets.

View midoghranek's full-sized avatar
☑️

Muhammad Abu 'l-Gharaniq midoghranek

☑️
View GitHub Profile
@oelbaga
oelbaga / 01 - Setup Nextjs site on Ubuntu Server - Terminal commands
Last active November 11, 2024 16:31
Setup NextJS app on Digital Ocean Ubuntu server Full Terminal Commands Step by Step
#Setup NextJS on Ubuntu server (Digital Ocean, EC2,...) Terminal Commands
#based on my YouTube video
#Recommended: An ubuntu server with at least 2 GB memory to handle npm run build
#login to server
ssh root@ip_address
#Upgrade Server - may take a few minutes
sudo apt update
sudo apt upgrade
@FlorianRappl
FlorianRappl / useCarousel.ts
Last active August 16, 2024 06:30
The generic useCarousel hook.
import { useReducer, useEffect } from 'react';
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable';
function previous(length: number, current: number) {
return (current - 1 + length) % length;
}
function next(length: number, current: number) {
return (current + 1) % length;
}
@lopspower
lopspower / README.md
Last active November 14, 2024 08:32
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store