Skip to content

Instantly share code, notes, and snippets.

View shellking4's full-sized avatar

Donald KANTI shellking4

View GitHub Profile
@shellking4
shellking4 / aparsys-api
Last active April 15, 2023 12:03
nginx config ssl
#SSL certificates issuing
sudo openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 36500 -keyout /etc/ssl/main.key -out /etc/ssl/main.crt
# Nginx Conf
upstream backend {
server 127.0.0.1:3000;
keepalive 64;
}
{
"departements": [
{
"name": "ALIBORI",
"towns": [
{
"name": "SEGBANA",
"districts": [
{
"name": "LIBANTE",
@shellking4
shellking4 / simple-pagination.js
Created December 22, 2022 14:05 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;