- Go to Grafana > Alerting > Notification channels > New channel.
- Type: Telegram. It will ask you for a Bot API Token and a Chat ID.
- Open a chat with BotFather on Telegram.
- Type
/newbot
- Type your bots name. e.g.
Grafana Bot
- Type your bots username. e.g.
a_new_grafana_bot
- You get your Bot API Token. Paste it on Grafana.
- Before making getUpdates (in the next step) you should add your bot into your telegram client and run
/start
. Thus you start chatting with the bot and this room is assigned chat id. (Thanks to @KES777)
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
<?php | |
/** | |
* 'special-term' is a unique butterfly | |
*/ | |
function dbx_get_special_terms() { | |
return array( 'special-term' ); | |
} | |
/** |
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
/** Define Gravity Forms License Key */ | |
define("GF_LICENSE_KEY", "YOUR-LICENSE-KEY-HERE"); |
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
<?php | |
/* | |
Author: Pete Nelson @GunGeekATX | |
Expands upon the Custom Meta Boxes library to provide a user-facing input form, | |
list & detail page of custom post types. This code sample doesn't include all the libraries | |
such as jQuery tablesorter or validate but can be found elsewhere easily enough. | |
*/ |
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
<?php | |
//let's get some tweets!! | |
//first, let's see if I've got the data already cached | |
$tweets = get_transient("tweets"); | |
//dang it! it looks like I might not. let's grab some tweets from the Twitter API | |
if( !$tweets ) { |
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
<?php | |
/* | |
* Check the URL of the WordPress login | |
* page for a specific query string | |
* | |
* assumes login string is | |
* http://mysite.com/wp-login.php?question=answer | |
*/ | |
function rkv_login_stringcheck() { |
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
<?php | |
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function be_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; |
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
<!-- in footer.php --> | |
<div class="footer-text"><?php echo get_theme_mod('footer_text') ?></div> | |
<!-- rendered HTML content --> | |
<div class="footer-text">©2012 Site Name</div> | |
<!--in functions.php (to enable the field in the Theme Customizer) --> | |
<?php |
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
WordPress is actually one of the most secure pieces of software available. It powers 17% | |
of the 1,000,000 most visited websites, so it is being constantly tested both internally | |
and by hackers. When an issue is discovered, an update is released which you can install | |
with one click in the dashboard. | |
The vast majority of hacked WordPress websites are running an out-of-date version of | |
WordPress. Once WordPress is updated, any vulnerabilities that are patched are now publicly | |
known, so old versions are vulnerable. | |
The next most likely source of hacking is your host. If your server isn't secure, it doesn't |
NewerOlder