Skip to content

Instantly share code, notes, and snippets.

View dhpradeep's full-sized avatar
🏠
Working from home

Pradip Dhakal dhpradeep

🏠
Working from home
View GitHub Profile
@datchley
datchley / react-redux-style-guide.md
Last active February 13, 2024 14:30
React + Redux Style Guide
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
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;
@jonashansen229
jonashansen229 / class.database.php
Last active June 20, 2023 08:41
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";