Skip to content

Instantly share code, notes, and snippets.

enum SquarePossibilities {
X = 'X',
O = 'O',
}
type SquareType = SquarePossibilities | null;
/**
* Return winner from tic tac toe game
* @argument squares: SquareType[]
@bcamargogui
bcamargogui / workplace-linux-app
Created September 28, 2020 13:28
Native workplace linux app
# Using https://github.com/jiahaog/nativefier
nativefier \
--name workplace-for-linux \
--show-menu-bar \
--single-instance \
--tray start-in-tray \
work.workplace.com
@bcamargogui
bcamargogui / cobasi-mail-for-linux
Created September 28, 2020 13:31
Native cobasi mail app for linux
# Using https://github.com/jiahaog/nativefier
nativefier \
--name cobasi-mail-for-linux \
--ignore-certificate \
--insecure \
--show-menu-bar \
--tray start-in-tray \
--single-instance \
mailnew.cobasi.com.br
@bcamargogui
bcamargogui / convert-body-to-base64.js
Created August 9, 2023 18:06
Postman pre-request script convert body to base64 - Commercetools
// Convert part of the body to base64 (same format as messages)
var data = JSON.parse(pm.request.body.raw);
const newBody = {
...data,
message: {
data: Buffer.from(JSON.stringify(data.message.data)).toString('base64'),
}
};