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
-- Query APM agent version | |
-- https://discuss.newrelic.com/t/is-there-a-nrql-query-i-can-do-that-will-list-all-of-the-versions-of-my-apm-agents/105495 | |
SELECT agentHostname, apmAgentVersion, apmAppName, apmLanguage | |
FROM NrDailyUsage | |
WHERE apmLanguage IS NOT NULL | |
SINCE 1 day ago | |
LIMIT MAX |
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
/* Based on: https://stackoverflow.com/a/44018490/31493 */ | |
var duration = /(-?\d*\.?\d+(?:e[-+]?\d+)?)\s*([a-zμ]*)/ig | |
/** | |
* conversion ratios | |
*/ | |
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
/* | |
* Bookmarks toolbar is visible only on new tab page, just like Chrome. | |
* | |
* Screenshot: https://vimeo.com/235059188 | |
* Video: https://vimeo.com/240436456 | |
* | |
* Contributor(s): https://www.reddit.com/user/AJtfM7zT4tJdaZsm and Andrei Cristian Petcu | |
* https://www.reddit.com/r/FirefoxCSS/comments/7evwow/show_bookmarks_toolbar_only_on_new_tab/ | |
*/ |
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
!Source: https://www.reddit.com/r/brasil/comments/93zlgh/e_reclamam_do_adblock/e3ikvb9/ | |
! | |
!Desabilitar notificações | |
||onesignal.com^ | |
||pushcrew.com^ | |
||widget.intercom.io^ | |
||pushnews.eu^ | |
! Block Pushnews (heavily abused by Exame, and other Brazilian media sites) | |
/pushnews-sw.js |
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
SELECT s.pid, s.ssl, s.version, a.client_addr, a.usename, a.datname, a.query | |
FROM pg_stat_ssl AS s | |
JOIN pg_stat_activity AS a ON a.pid = s.pid; | |
-- You can see `t|f` in `ssl` field |
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
/* | |
* Usage: Tools > Script Editor | |
* replace all code with below | |
* Click Run | |
* | |
* Source: https://stackoverflow.com/a/13591754/31493 | |
*/ | |
function onOpen() { | |
// get active spreadsheet |
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
while true; do | |
date -Isec | sed -e 's/+00:00//' | tr '\n' ' ' | |
pg_isready -h YOUR_RDS_INSTANCE.rds.amazonaws.com -U USER -d DB_NAME | |
sleep 1 | |
done | tee connection-test-$(date -Imin).log |
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
# Dockerfile for a multi-stage build of a Ruby app which needs Node at build time | |
# | |
# Thanks to https://github.com/gomex for sharing | |
FROM ruby:2.5.1 as builder | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - &&\ | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list |
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
# gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate's text-to-speech API | |
# https://github.com/pndurette/gTTS | |
pipsi install gTTS | |
sudo apt install mpg123 | |
say() { | |
gtts-cli "$@" | mpg123 - | |
} |