This file contains hidden or 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
function getPastRoundedHours() { | |
const formattedDate = (date) => { | |
const year = date.getFullYear(); | |
const month = String(date.getMonth() + 1).padStart(2, '0'); | |
const day = String(date.getDate()).padStart(2, '0'); | |
const hours = String(date.getHours()).padStart(2, '0'); | |
return `${year}-${month}-${day} ${hours}:00:00`; | |
} | |
const now = new Date(); |
This file contains hidden or 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
cat $CARGO_HOME/.crates.toml | |
cat $CARGO_HOME/.crates2.json | jq . | |
cargo install --list | |
cargo install -f cargo-upgrades | |
rustup update |
This file contains hidden or 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
db.getCollection("products").find({ | |
app: 'ios', | |
market: 'pt-BR', | |
programId: '32135' | |
}); | |
db.getCollection("products").findOneAndUpdate({ | |
app: 'ios', | |
market: 'pt-BR', | |
programId: '32135' |
This file contains hidden or 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
{"label":"Test Coverage","message":"51.87%","schemaVersion":1,"color":"green","namedLogo":"jest"} |
This file contains hidden or 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
brew install node | |
mkdir "${HOME}/.npm-packages" | |
echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.bashrc | |
echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc | |
echo NODE_PATH=\"\$NPM_PACKAGES/lib/node_modules:\$NODE_PATH\" >> ${HOME}/.bashrc | |
echo PATH=\"\$NPM_PACKAGES/bin:\$PATH\" >> ${HOME}/.bashrc | |
echo source "~/.bashrc" >> ${HOME}/.bash_profile | |
source ~/.bashrc |
This file contains hidden or 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
CREATE STREAM "my-stream1" | |
(data STRUCT< | |
EmailTemplateName VARCHAR, | |
EmailAddress VARCHAR>, | |
maskEmail VARCHAR, | |
market VARCHAR) | |
WITH (kafka_topic='growthnonprod-signup-api-emails-dev', value_format='json'); | |
select data->EmailTemplateName as EmailTemplateName, data->EmailAddress as EmailAddress, maskEmail, market from "my-stream1" EMIT CHANGES; |
This file contains hidden or 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
{ | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": ":github: Actions - *predefined message*:\ncat - info, error, broadcast" | |
}, | |
"accessory": { | |
"type": "image", |
This file contains hidden or 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
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
This file contains hidden or 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> | |
const electron = require('electron'); | |
// below is just plain angular stuff | |
System | |
.config({ | |
packages: { | |
angular: { | |
format: 'register', | |
defaultExtension: 'js' |
This file contains hidden or 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
// Logger | |
// global object: Log | |
/** | |
* writes logs | |
* @param {String} cat - Short string for loggly filter | |
* @param {String} message | |
* @param {Object} data | |
* @param {Object} wwContext | |
* @param {string} file filename |
NewerOlder