Skip to content

Instantly share code, notes, and snippets.

View chraiet's full-sized avatar
🚀

Mohamed Chraiet chraiet

🚀
View GitHub Profile
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@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";
<?php
/**
* Created by PhpStorm.
* User: mchraiet
* Date: 16/02/17
* Time: 2:52 PM
*/
class Person
{