Skip to content

Instantly share code, notes, and snippets.

View motz182's full-sized avatar

MOISES A. REICHERT motz182

  • High Solutions
  • Brasil
View GitHub Profile
@motz182
motz182 / removeAll.txt
Last active February 28, 2022 20:24 — forked from iaindooley/gist:1050206046077b04c489433f0f85d9e6
removeAllAttachments
new Notification(notification).addedLabel("Remove All Attachments").card().attachments().each(function(att)
{
att.remove();
});
@motz182
motz182 / cpif.txt
Last active April 22, 2020 14:09
IF WITH REPLACE
/** @OnlyCurrentDoc */
function custo() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('F5:F29').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Calc Custo'), true);
spreadsheet.getRange('C:C').activate();
spreadsheet.getActiveSheet().insertColumnsAfter(spreadsheet.getActiveRange().getLastColumn(), 1);
spreadsheet.getActiveRange().offset(0, spreadsheet.getActiveRange().getNumColumns(), spreadsheet.getActiveRange().getNumRows(), 1).activate();
spreadsheet.getRange('D2').activate();
@motz182
motz182 / dobackup.php
Created April 19, 2020 20:30
Correção de pasta para download
<?php
/**
* @copyright 2014-2019 Sentora Project (http://www.sentora.org/)
* Sentora is a GPL fork of the ZPanel Project whose original header follows:
*
* ZPanel - A Cross-Platform Open-Source Web Hosting Control panel.
*
* @package ZPanel
* @version $Id$
@motz182
motz182 / copy_not_duplicated.txt
Last active September 12, 2019 03:57 — forked from iaindooley/gist:1a5f6411524cc60f010636b781e5885d
Copy card if not duplicated
function copp_auto(notification)
{
var added = new Notification(notification).addedCard("Fechada");
try
{
added.board("Automação").list("Temp").card(added.name());
}
catch(e)
@motz182
motz182 / Checklist_corte.txt
Last active November 26, 2019 02:52 — forked from iaindooley/gist:6b414089d8d421eabdd7b59762e03bf7
Add labels to checklist
function addchecklistfromlabel(notification)
{
new Notification(notification).cards().each(function(card)
{ var label = new Notification(notification).addedLabel();
card.addChecklist("Corte",function(list)
{
list.addItem(label.name());
});
@motz182
motz182 / cp_to_esc
Last active September 11, 2021 03:34 — forked from iaindooley/Linked checklists
Linked checklists
function CpEscritorio(notification)
{
//Get a card moved to the Fechada List
var card = new Notification(notification).movedCard("Obras Fechadas");
//Copy the card to the top of the Started list in the Work In Progress Board
card.attachLink(
card
.copyToList(new Trellinator().board("Automação").findOrCreateList("Temp"),"top")
.attachLink(card.link())
.link()
@motz182
motz182 / mv_Esc.txt
Last active September 7, 2019 23:34 — forked from iaindooley/gist:765d40fbadb8ff42a9a9564dca54ab98
Move card to Escritorio
function MvEsc(notification)
{
new Notification(notification)
.movedCard("Fechada")
.moveToList(Board.findOrCreate("Escritório - Alumínio").findOrCreateList("Obras Fechadas"));
}
@motz182
motz182 / add_checklist_from_label
Last active September 19, 2019 16:08 — forked from iaindooley/add_checklist_from_label
Add checklist from label
function addChecklistFromLabel(notification)
{
var label = new Notification(notification).addedLabel();
label.card().board("Orçamentos - Alumínio").card("teste").addChecklist(label.name(),label.card());
}
@motz182
motz182 / perfil add
Last active September 8, 2019 18:07 — forked from iaindooley/notify_on_label_add
Notify on label add
function notifyOnLabelAdd(notification)
{
var label = new Notification(notification).addedLabel();
label.card().postComment("Esquadria "+label.name());
}
@motz182
motz182 / Full audit trail
Created September 7, 2019 02:56 — forked from iaindooley/Full audit trail
Full audit trail
function fullAuditTrail(notification)
{
var notif = new Notification(notification);
var card = notif.card();
try
{
var sheet = SpreadsheetApp.openByUrl(card.attachment("Full Audit Trail").link()).getSheetByName("Actions Log");
}