Skip to content

Instantly share code, notes, and snippets.

View ybelenko's full-sized avatar

Yuriy Belenko ybelenko

View GitHub Profile
@ybelenko
ybelenko / disableGoogleMapsTab.js
Last active November 15, 2018 17:12
Few jQuery helpers to set elements inside Google Map not to be interactable by TAB key
function disableGoogleMapsTab(mapId) {
$(mapId).find('a, button, div[tabindex], iframe').each(function(index, item) {
item.setAttribute('tabindex', -1)
})
}
function enableGoogleMapsTab(mapId) {
$(mapId).find('a, button, iframe').each(function(index, item) {
item.removeAttribute('tabindex')
})
{
// Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
"slim4 skeleton Twig template": {
"prefix": "extends",
"body": [
"{% extends \"layout/${1|layout-empty,layout|}.twig\" %}",
"",
@ybelenko
ybelenko / slack_log.sh
Last active December 11, 2022 10:33
Shell logging to Slack Webhook
#!/bin/bash
#######################################
# Send log message to Slack channel via Webhook.
#
# @author Yuriy Belenko <[email protected]>
# This functions requires jo package installed. https://github.com/jpmens/jo
#
# Originally developed as almost zero dependency(jo only) alternative of Slack Monolog PHP handler:
# https://github.com/Seldaek/monolog/blob/main/src/Monolog/Handler/SlackWebhookHandler.php