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 strict'; | |
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var autoprefixer = require('gulp-autoprefixer'); | |
| var livereload = require('gulp-livereload'); | |
| var gulpCssGlobbing = require("gulp-css-globbing"); | |
| var imagemin = require('gulp-imagemin'); | |
| var spritesmith = require('gulp.spritesmith'); |
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
| // Margens | |
| $margins: top bottom left right; | |
| @each $margin in $margins{ | |
| @for $i from 1 through 10 { | |
| .m-#{$margin}-#{$i} { | |
| margin-#{$margin}: $i * 10px; |
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 test = require('tape') | |
| var feedCat = require(process.argv[2]) | |
| test('tests', function (t) { | |
| t.equal(feedCat('food'), 'yum') | |
| t.throws(feedCat.bind(null, 'chocolate')) | |
| }) |
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', |
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
| /* | |
| * 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
| 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
| (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
| // 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
| <?php | |
| class AMP { | |
| private $html; | |
| /** | |
| * HtmlToAmp constructor. | |
| */ | |
| public function __construct($htmlContent) { |