Skip to content

Instantly share code, notes, and snippets.

View kreativan's full-sized avatar

Ivan Milincic kreativan

View GitHub Profile
@kreativan
kreativan / spintax.php
Created November 3, 2018 17:03
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis
*
*/
class Spintax
{
public function process($text)
@kreativan
kreativan / Mustache.js
Created January 27, 2018 14:20
jQuery Mustache.js
/**
* Basic Template
*/
var person = {
firstName: "Ivan",
lastName: "Milincic",
blogURL: "http://kreativan.net"
};
var template = "<h1>{{firstName}} {{lastName}}</h1>Website: {{blogURL}}";
var html = Mustache.to_html(template, person);
@kreativan
kreativan / php_calendar.php
Created January 27, 2018 14:00
PHP Calendar Table
<?php
/* draws a calendar */
function renderCalendar($timestamp){
$month = date("m", $timestamp);
$year = date("Y", $timestamp);
/* draw table */
$calendar = '<table cellpadding="0" cellspacing="0" class="calendar">';