This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.
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() { | |
const style = ` | |
:host { | |
display: inline-block; | |
margin: 0 5px; | |
contain: content; | |
} | |
` | |
// usage <display-date format="DD/MM/YYYY"></display-date> |
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
<div class="lista-pessoas"></div> | |
<style> | |
</style> | |
<script> | |
var listaDeFuncionarios = [ | |
{ |
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 | |
/** | |
* To run PHP server just paste the code bellow in root path : | |
* $ php -S 0.0.0.0:8080 -t ./public -f webServer.php | |
**/ | |
if (preg_match('/\.css|\.js|\.jpg|\.png|\.map$/', $_SERVER['REQUEST_URI'], $match)) { | |
$mimeTypes = [ | |
'.css' => 'text/css', | |
'.js' => 'application/javascript', | |
'.jpg' => 'image/jpg', |
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
{ | |
"color_scheme": "Packages/1337 Color Scheme/1337.tmTheme", | |
"file_exclude_patterns": | |
[ | |
"*.pyc", | |
"*.pyo", | |
"*.exe", | |
"*.dll", | |
"*.obj", | |
"*.o", |
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
Element.prototype.addClass = function (className) { | |
if (this.className.indexOf(className) === -1) | |
this.className = this.className + ' '+className; | |
}; | |
Element.prototype.hasClass = function (className) { | |
return (this.className.indexOf(className) > -1); | |
} | |
Element.prototype.removeClass = function (className) { |
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
angular.module('starter.services', []) | |
.service('$storage', function () { | |
this.get = function (key) { | |
var arrK = key.split('.'), | |
first = arrK.shift(), | |
result = JSON.parse(localStorage.getItem(first)); | |
if (arrK.length === 0) { | |
return result; |
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 | |
class User implements IEntity | |
{ | |
public $id = null; | |
public $name = ''; | |
public $email = ''; | |
public $pass = ''; | |
public function hasId() |
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 | |
function deleteDir($source) | |
{ | |
if(!is_dir($source)) | |
return false; | |
$it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source), | |
\RecursiveIteratorIterator::SELF_FIRST); | |
$it->next(); |
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 | |
// encontrada nesse link | |
// http://www.php.net/manual/en/function.htmlentities.php | |
function ascii2entities($string){ | |
for($i=128;$i<=255;$i++){ | |
$entity = htmlentities(chr($i), ENT_QUOTES, 'cp1252'); | |
$temp = substr($entity, 0, 1); | |
$temp .= substr($entity, -1, 1); |
NewerOlder