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
| sudo groupadd docker | |
| sudo gpasswd -a username docker | |
| sudo service docker 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
| <?php | |
| function routes($path, $routes) { | |
| foreach ($routes as $route) { | |
| // regular expressio to detect path tags | |
| $tagsregex = '/(\{([\w]+)\})/'; | |
| // regular expression to test route | |
| $regex = '/' . str_replace('/', '\\/', "^{$route[0]}$") . '/'; |
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_URI} !^public | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| </IfModule> |
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
| # file: .git/hooks/post-receive | |
| #!/bin/sh | |
| export GIT_WORK_TREE=/var/www/domain.com/htdocs | |
| cd $GIT_WORK_TREE | |
| sudo -u www-data git checkout -f | |
| # file: visudo | |
| Defaults!/usr/bin/git env_keep=GIT_WORK_TREE | |
| webarthur ALL=(www-data) NOPASSWD: /usr/bin/git | |
| webarthur ALL=(www-data) NOPASSWD: /bin/chmod |
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
| .slide-up, .slide-down { | |
| overflow:hidden; | |
| } | |
| .slide-up > div, .slide-down > div { | |
| transform: translateY(-100%); | |
| transition: .4s ease-in-out; | |
| } | |
| .slide-down > div { | |
| transform: translateY(0); | |
| } |
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
| document.addEventListener("DOMContentLoaded", function(event) { | |
| document.write = function (code) { | |
| var gistURL, div, a, style; | |
| // create a <div> element to search gist url | |
| div = document.createElement('div') | |
| div.innerHTML = code | |
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 gulp = require('gulp') | |
| , markdown = require('markdown') | |
| , fileinclude = require('gulp-file-include'); | |
| // importa json para variável | |
| var app = require('./package.json') | |
| // task principal | |
| gulp.task('default', function() { | |
| gulp.src(['index.html']) |
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
| @@include('header.html') | |
| <article> | |
| <header> | |
| <h1>Título do artigo</h1> | |
| </header> | |
| <section> | |
| <h3>Subtítulo do artigo</h3> | |
| <p>Mussum Ipsum, cacilds vidis litro abertis. Nullam volutpat risus nec leo commodo, ut interdum diam laoreet.</p> |
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 gulp = require('gulp') | |
| , fileinclude = require('gulp-file-include'); | |
| gulp.task('default', function() { | |
| gulp.src(['index.html']) | |
| .pipe(fileinclude()) | |
| .pipe(gulp.dest('./')); | |
| }); |
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 routes = (function(history){ | |
| // configura função pushState para checar rotas | |
| var pushState = history.pushState; | |
| history.pushState = function(state) { | |
| typeof(history.onpushstate) == "function" && history.onpushstate({state: state}); | |
| setTimeout(routes.check, 10); | |
| return pushState.apply(history, arguments); | |
| }; |