This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Slides.js Demo</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="https://gist.github.com/AugustMiller/7521053/raw/e5900f4a6628719c730c7c3f8acfcc6b28223aa3/Slides.js"></script> | |
<style> | |
html , body { | |
margin: 0; | |
padding: 0; |
This file contains 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
// Implemented like this: | |
$(document).ready( function ( ) { | |
var Chooser = new Menu ( "#select", [ | |
{ label : "First Item", value : "1" }, | |
{ label : "Second Item", value : "2" }, | |
{ label : "Your Mother's Item", value : "3" } | |
]); | |
}) |
This file contains 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 mapNumber (number, inMin, inMax, outMin, outMax) { | |
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; | |
} |
This file contains 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
Array.prototype.pick = function ( ) { | |
return this[ Math.floor( Math.random() * this.length ) ]; | |
}; |
This file contains 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
img { | |
filter: contrast(69%) hue-rotate(-4deg) saturate(90%); | |
} |
This file contains 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
<? | |
class kirbytextExtended extends kirbytext { | |
function __construct($text, $markdown=true) { | |
parent::__construct($text, $markdown); | |
# A "Resource" as we're calling it needs a filename, scope and link text: | |
$this->addTags('resource'); |
This file contains 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
{ | |
"bold_folder_labels": true, | |
"caret_extra_width": 1, | |
"caret_style": "smooth", | |
"color_scheme": "Packages/User/SublimeLinter/Birds_of_Paradise (SL).tmTheme", | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.pyc", |
This file contains 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
var Holiday, Snow, Flake; | |
Snow = function (density, intensity) { | |
var self = this; | |
self.flakes = []; | |
self.options = { | |
container: $('<div />').attr({'id': 'snow'}).appendTo(document.body), | |
count: density, | |
intensity: intensity, |
This file contains 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 field::$methods['json'] = function($field, $property = null) { | |
$data = (array)json_decode($field->value); | |
return ($property && isset($data[$property]) ? $data[$property] : $data); | |
}; |
This file contains 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 field::$methods['asEmail'] = function($field) { | |
return html::a('mailto:' . $field->value, $field->value); | |
}; |
OlderNewer