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
| // DOM | |
| var ge = function (el) { | |
| return (typeof el == 'string' || typeof el == 'number') ? document.getElementById(el) : el; | |
| }; | |
| var geByTag = function (searchTag, node) { | |
| node = ge(node) || document; | |
| return node.getElementsByTagName(searchTag); | |
| }; |
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
| /* | |
| * Usage: | |
| * | |
| <div class="sk-double-bounce"> | |
| <div class="sk-child sk-double-bounce1"></div> | |
| <div class="sk-child sk-double-bounce2"></div> | |
| </div> | |
| * | |
| */ | |
| .sk-double-bounce { |
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> | |
| <!-- | |
| To change this license header, choose License Headers in Project Properties. | |
| To change this template file, choose Tools | Templates | |
| and open the template in the editor. | |
| --> | |
| <html> | |
| <head> | |
| <title>TODO supply a title</title> | |
| <meta charset="UTF-8"> |
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 | |
| class AMP { | |
| private $html; | |
| /** | |
| * HtmlToAmp constructor. | |
| */ | |
| public function __construct($htmlContent) { |
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
| // SUPERSCRIPT REGISTERED TRADEMARK SYMBOL | |
| jQuery(function ($) { | |
| $('h1,h2,h3,p,a').contents().filter(function() { | |
| return this.nodeType === 3; | |
| }).replaceWith(function() { | |
| return this.nodeValue.replace(/(@SUP\s*)(.+?)(\s*@SUP)/gi, '<sup class="custom-sup">$2</sup>'); | |
| }); | |
| }); |
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 ($) { | |
| "use strict"; | |
| var opt = { | |
| // Area to detect click ation | |
| onClickArea: document, | |
| // Attribute to get the click ation | |
| attribute: '.goto a', | |
| // Incremental space difference to top | |
| spaceToTop: 20, |
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
| public function addSpace($n, $string = '') { | |
| if ($n === 0) { | |
| return $string; | |
| } | |
| else { | |
| $space = ' '; | |
| return $space .= addSpace($n - 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
| /* | |
| * Hide sidebar on video start manually | |
| * @returns {undefined} | |
| */ | |
| function hideSidebar() { | |
| // Variables | |
| var $thumbVideoSection = jQuery('.thumbnails-video-section'), $shareSection = jQuery('.share-section'); | |
| $thumbVideoSection.addClass('retracted') ; | |
| $shareSection.addClass('retracted'); |
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
| # Use to open context 'subl ~/.bashrc' | |
| MYSQL_USER="root" | |
| MYSQL_PASS="admin" | |
| # Restart Apache. | |
| fapache_restart() { | |
| sudo service apache2 restart | |
| } |
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
| var ex = { | |
| p: '.phtml', | |
| h: '.html' | |
| }; | |
| var url = { | |
| a: '/', | |
| b: '/signin', | |
| c: '/signup', |