Skip to content

Instantly share code, notes, and snippets.

View BobToninho's full-sized avatar
🐘

Roberto Tonino BobToninho

🐘
View GitHub Profile
@BobToninho
BobToninho / machine.js
Created March 13, 2021 23:14
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@BobToninho
BobToninho / machine.js
Last active July 12, 2021 16:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@BobToninho
BobToninho / machine.js
Last active September 24, 2021 13:56
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@BobToninho
BobToninho / machine.js
Last active October 6, 2021 12:34
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@BobToninho
BobToninho / machine.js
Created March 25, 2022 10:41
Generated by XState Viz: https://xstate.js.org/viz
const accordionsMachine = Machine({
id: "list-element-accordions",
initial: "closed",
states: {
closed: {
on: {
OPEN_LIST_ELEMENT: {
target: "path-accordions",
},
},
@BobToninho
BobToninho / powerapps-check-user-in-group.txt
Created April 26, 2023 08:50
Check if user is in a group in PowerApps
// Note: GruppidiOffice365 will vary according to your PowerApps UI language. Yes, it's ugly
Set(
varIsInGroup;
User().Email in GruppidiOffice365.ListGroupMembers("GROUP_ID").value.userPrincipalName ||
User().Email in GruppidiOffice365.ListGroupMembers("GROUP_ID").value.mail
);;
@BobToninho
BobToninho / powerapps-gather-tables-with-read-permissions.txt
Last active April 26, 2023 09:50
Gather tables with read permission in PowerApps
// Resets the Collection
Clear(colTableList);;
If(
DataSourceInfo(
'Table To Check';
DataSourceInfo.ReadPermission
);
Collect(
colTableList;
{
@BobToninho
BobToninho / git-pretty-log.txt
Created May 16, 2023 16:37
Git log with hashes and dates
git log --format="%Cgreen%h %Creset| %Cblue%cs %Creset| %s"
@BobToninho
BobToninho / md-to-odt.nu
Created June 26, 2023 10:58
Define an utility function for converting markdown files to odt together with the script to use it
ls *.md | each { |it| $it.name | parse '{file_name}.{extension}' | get file_name } | flatten | each { |it| to-odt $it }
@BobToninho
BobToninho / convertFonts.js
Created June 29, 2023 09:40
Google Docs: Replace paragraphs' fonts with a new font
const IS_DRY_RUN = false
const FONTS_TO_REPLACE = ['Arial', 'Times New Roman']
const REPLACING_FONT = 'Helvetica Neue'
function convertFonts() {
const doc = DocumentApp.getActiveDocument();
const body = doc.getBody();
const paragraphs = body.getParagraphs();