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
/** | |
* Converts a rich text value to HTML markup. | |
* | |
* Only honours "markdown-supported" HTML tags, disregarding any other cell formatting value (such as color, background color, etc.). In other words, keeps the plain text value of the text in the cell, adding only the following HTML tags when necessary: | |
* | |
* - <strong> | |
* - <em> | |
* - <del> | |
* - <span style="text-decoration: underline"> | |
* - <a href=""> |
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
/** | |
* Facilitates adding includes into HTML documents. | |
* <?!= include('path/to/filename'); ?> | |
* | |
* https://developers.google.com/apps-script/guides/html/best-practices#separate_html_css_and_javascript | |
*/ | |
function include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename).getContent(); | |
} |
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
/** | |
* Creates a new top-level menu item (called: 🔬) with useful debugging options within. | |
* | |
* Requires a global `CONFIG.ENV` variable is set to "development". | |
*/ | |
if (CONFIG.ENV === 'development') { | |
var ui = DocumentApp.getUi(); | |
var topMenu = ui.createMenu('🔬'); // As addon, equivalent to `ui.createAddonMenu()` (title is the Addon name) | |
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
<figure class="op-tracker"> | |
<iframe> | |
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
document,'script','https://connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', '{PIXEL/APP_ID}'); // Insert your pixel ID here. |
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
git filter-branch -f --env-filter \ | |
'if [ $GIT_COMMIT = dad723b0e1993e4626e4d91edcea101389bdd87e ] | |
then | |
export GIT_AUTHOR_DATE="Mon Nov 17 16:00:53 2014 +0000" | |
export GIT_COMMITTER_DATE="Mon Nov 17 16:00:53 2014 +0000" | |
fi' |
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
# use: | |
# .bash_profile - only gets executed for login bash shells | |
# .bashrc - only gets executed for NON-login bash shells for only NON-login shells | |
# .profile - gets executed for ANY login shell | |
# .bash_logout - only gets executed for bash shells after logout | |
# Sets the prompt: | |
#PS1='\h:\w \u\$ ' | |
#PS2='> ' |
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
[user] | |
name = Paulo Avila | |
#email = | |
[alias] | |
br = branch | |
co = checkout | |
ci = commit -a | |
feature = checkout -b | |
amend = commit --amend #--no-edit |
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
changeset = "{shortest(node)} {label('blue', '{author|user}')}{if(phabdiff, label('bold', \" {phabdiff}\"))}{bookmarks} {label('cyan', '({date|age})')}\n{desc|firstline}{ifeq(rev, revset('.'), '{files}{file_mods}{file_adds}{file_dels}')}\n\n" | |
# CURRENTLY, for some reason, the ifeq() condition doesn't work | |
# I think it's because we're doing the check with "current" inside this "bookmark variable" | |
bookmark = " {ifeq(bookmark, current, label('yellow', '{bookmark}*'), label('green', '{bookmark}'))}" | |
#start_files = "ALL:\n" | |
start_files = "\n\n {sub(\"(\d+):\s+\+(\d+)\/-(\d+)\", label('magenta underline', '\\1 files changed: +\\2/-\\3:'), diffstat)}" | |
file = "" | |
end_files = "" |
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
[ui] | |
username = Paulo Avila #<> | |
status.modified = blue bold # M | |
status.added = green bold # A | |
status.removed = red bold # R | |
#status.clean = # C | |
#status.deleted = cyan bold # | |
#status.missing = # ! | |
#status.untracked = blue bold # ? |
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
### Bash colors and formatting | |
# To set the formatting/color, use the following: | |
# - escape character (\e, \033, \x1B) | |
# - open square bracket | |
# - attributes (semicolon-separated) | |
# - the letter m | |
# | |
# \033[<attribute>;...m |
NewerOlder