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
package main | |
//go:generate go run -mod=mod github.com/golang/mock/mockgen -package main -destination=adapter_mock.go -source=./adapter.go -build_flags=-mod=mod | |
type ( | |
ExternalAdapter interface { | |
ExternalCall() error | |
} | |
externalAdapter struct { | |
} |
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
param ( | |
[string]$fileName = "model.xml" | |
) | |
If (Test-Path $fileName) { | |
$modelXmlPath = Resolve-Path $fileName | |
} else { | |
Write-Host ("File " + (Resolve-Path .) + "\" + $fileName + " does not exist"); | |
exit; | |
} |
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
<script total> | |
// register component in admin group | |
exports.group = 'admin'; | |
exports.install = function() { | |
// MODEL: /schemas/properties.js | |
ROUTE('GET #admin/api/properties/ *Property --> @query', ['&admin', 'id:properties']); | |
ROUTE('GET #admin/api/properties/{id}/ *Property --> @read', ['&admin', 'id:properties']); | |
}; | |
exports.uninstall = function() { |
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
require('total.js'); | |
var clean = function(name) { | |
return function(next) { | |
TABLE(name + 'data').remove().like('id', '_').callback(function() { | |
TABLE(name + 'data').clean(); | |
NOSQL(name).clean(); | |
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
<!-- This is a suggestion based on https://github.com/totaljs/widgets/blob/master/ContentNoticesMasonry/widget.html --> | |
<style> | |
.wc140 { column-width: 280px; column-gap: 20px; width: 100%; margin: 30px auto; } | |
.wc140 figure { width: 100%; background: white; border: 1px solid #E0E0E0; margin: 0 2px 20px; padding: 15px; display: inline-block; column-break-inside: avoid; border-radius: 4px; line-height: 18px; } | |
.wc140 .date { font-size: 11px; color: #A0A0A0; margin-bottom: 10px; } | |
.wc140 .date .fa { margin-right: 5px; } | |
.wc140 figure img { border-radius: 3px; } | |
.wc140 figure code { background-color: #F0F0F0; padding: 1px 3px; border-radius: 3px; font-size: 12px; } | |
.wc140 figure blockquote { background-color: #F0F0F0; padding: 10px; margin: 0 0 15px; border-radius: 4px; } | |
.wc140 figure p { margin-top: 0; margin-bottom: 15px; } |
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
// Add this file to /components/ directory | |
<script total> | |
// groups this component with admin | |
exports.group = 'admin'; | |
exports.install = function() { | |
// include custom routes here | |
}; | |
</script> |
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
# START Create Archives | |
# Author: Pedro Maia Costa <hello@pmcdigital.pt> | |
# Note: Please see Gist first comment, replace $var-name below with your values before running. | |
# Create an archive of the entire current branch | |
git archive -o ..\deploys\full.zip HEAD | |
# Create a diff of the files that are different between commits | |
git diff --no-commit-id --name-only --diff-filter=ACMRT $commitid > ../deploys/diff_$commitid.txt |
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
# START Create Fork | |
# Author: Pedro Maia Costa <[email protected]> | |
# Note: Please see Gist first comment, replace <var-name> below with your values before running. | |
# fork branch into vsts | |
cd your-project | |
git init . | |
# the target <your-repo> as origin | |
git remote add origin https://<your-vsts>.visualstudio.com/<your-repo-url> |
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
var template = `Dia: {0} | |
Hora inicio: 08h00 | |
Briefing: 08h30 | |
Fim: 12h30 | |
Duração: 04h00m | |
\r\n`; | |
var monthNames = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", | |
"Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" | |
]; |
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
/* *************** HTML ***************** | |
* <div class="form-group search-calendar"> | |
* <h3>Data</h3> | |
* <div class="bs-datepicker"> | |
* <div class="range-start"></div> | |
* <div class="range-end"></div> | |
* </div> | |
* <div class="row no-gutter"> | |
* <div class="col-md-6"> | |
* <input type="text" name="range-end" value="" placeholder="de" class="form-control range-input" /> |
NewerOlder