This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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">'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* @name Spintax | |
* @author Jason Davis | |
* | |
*/ | |
class Spintax | |
{ | |
public function process($text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// process $_POST request | |
if(isset($_POST["submitDropzone"])) { | |
// Do something | |
print_r($_POST); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* REST Helper. | |
* | |
* Copyright (c) 2014 Camilo Castro <[email protected]> | |
* | |
* Some portions of code are based on the Lime Project | |
* https://github.com/aheinze/Lime/ | |
* Copyright (c) 2014 Artur Heinze | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animateNumbers() { | |
var elements = document.querySelectorAll(".tm-animate-number"); | |
elements.forEach(e => { | |
let current = 0; | |
let end = e.getAttribute("data-number"); | |
let end_2 = (end > 200) ? end - 50 : end; | |
let increase_by = (end > 200) ? 23 : 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gradient color mixin | |
* Works great with text & icons fonts | |
*/ | |
.gradient-color-mixin(@color, @color-2, @deg: 90deg) { | |
color: transparent; | |
background-image: -webkit-linear-gradient(@deg, @color-2 0%, @color 100%); | |
background-image: -moz-linear-gradient(@deg, @color-2 0%, @color 100%); | |
background-image: linear-gradient(@deg, @color-2 0%, @color 100%); | |
-webkit-background-clip: text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* @param {string} id video element css ID | |
* | |
*/ | |
function openFullscreen(id) { | |
event.preventDefault(); | |
elem = document.getElementById(id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<a href="img_1.jpg" data-uk-gallery></a> | |
<a href="img_2.jpg" data-uk-gallery></a> | |
<a href="img_3.jpg" data-uk-gallery></a> | |
</div> | |
<div> | |
<a href="img_1.jpg" data-uk-gallery="cars"></a> | |
<a href="img_2.jpg" data-uk-gallery="cars"></a> | |
<a href="img_3.jpg" data-uk-gallery="cars"></a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createInput(name, placeholder = "") { | |
let input = document.createElement("INPUT"); | |
input.setAttribute("type", "text"); | |
input.setAttribute("name", name); | |
input.setAttribute("placeholder", placeholder) | |
input.classList.add("uk-input"); | |
return input; |
OlderNewer