Skip to content

Instantly share code, notes, and snippets.

<?php
class SingletonClass {
private static $instance;
private function __construct() { }
public function __clone() {
trigger_error('Clone is not allowed.', E_USER_ERROR);
}
public static function init() {
if (!isset(self::$instance)) {
$c = __CLASS__;
@levani
levani / 0_reuse_code.js
Created October 8, 2013 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@levani
levani / geoKeyboard.jquery.js
Last active October 5, 2015 16:28
Georgian keyboard jquery plugin
/*!
* Georgian Keyboard Plugin for jQuery
* Copyright (c) 2012 Levan Melikishvili.
* Licensed under the MIT license.
* Version: 0.1
*
example usage:
$('form_selector').geoKeyboard();