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 rgb(hex) { | |
| hex = hex.replace("#", ""); | |
| if (hex.length == 3) { | |
| var original = hex; | |
| hex = ""; | |
| for (var i = 0; i < 3; i++) { | |
| hex += original.charAt(i) + original.charAt(i); | |
| } | |
| } else if (hex.length != 6) { | |
| return; |
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 random(seed) { | |
| var x = Math.sin(seed); | |
| if (x < 0) { | |
| return x - (-1); | |
| } else { | |
| return x; | |
| } | |
| } |
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
| if (!-e $request_filename) { | |
| rewrite /wp-admin$ $scheme://$host$uri/ permanent; | |
| rewrite ^(/[^/]+)?(/wp-.*) $2 last; | |
| rewrite ^(/[^/]+)?(/.*\.php) $2 last; | |
| } |
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
| // Capitalize the first letter of the string. | |
| function capitalize(str) { | |
| return str.charAt(0).toUpperCase() + str.slice(1); | |
| } | |
| // Extend native String object. | |
| String.prototype.capitalize = function() { | |
| return this.charAt(0).toUpperCase() + this.slice(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
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| watch: { | |
| scripts: { | |
| files: ["src/*.js"], | |
| tasks: ["default"] | |
| } | |
| } | |
| }); | |
| grunt.loadNpmTasks("grunt-contrib-watch"); |
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
| /** | |
| * Generate hex color code from a string. | |
| * | |
| * @param {String} string | |
| * @return {String} | |
| */ | |
| $.string_to_color(""); | |
| /** | |
| * Set one or more CSS properties for the set |
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 escape(text) { | |
| var e = { | |
| "<": "<", | |
| ">": ">" | |
| }; | |
| return text.replace(/[<>]/g, function (c) { | |
| return e[c]; | |
| }); | |
| } |
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
| // Requires: | |
| // <script src="mustache.js"></script> | |
| // Template cache | |
| var tpl = []; | |
| // | |
| // Render templates. | |
| // | |
| // Usage: |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>-webkit-overflow-scrolling</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, user-scalable=no"> | |
| <style> |
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
| // Get the last word of a string. | |
| function last(str) { | |
| return str.trim().split(" ").pop(); | |
| } |