- Create a bot using @BotFather, get it's token
- Start conversation with bot
- Run following curl command
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
| function deleteEmails() { | |
| var sheet = SpreadsheetApp.openById('SHEET ID').getSheetByName('Sheet1'); | |
| var data = sheet.getDataRange().getValues(); | |
| for (var i = 1; i < data.length; i++) { | |
| var sender = data[i][0]; | |
| var subject = data[i][1]; | |
| var threads = GmailApp.search('is:read from:' + sender + ' subject:' + subject); | |
| Logger.log('Deleted' + i + ' emails') |
| function downloadUnreadEmails() { | |
| var sheet = SpreadsheetApp.create('Unread Emails'); | |
| sheet.appendRow(['Sender', 'Subject']); | |
| var threads = GmailApp.search('is:unread'); | |
| for (var i = 0; i < threads.length; i++) { | |
| var messages = threads[i].getMessages(); | |
| for (var j = 0; j < messages.length; j++) { |
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
| ing | |
| er | |
| a | |
| ly | |
| ed | |
| i | |
| es | |
| re | |
| tion | |
| in |
| # Use this script to test that your Telegram bot works. | |
| # | |
| # Install the dependency | |
| # | |
| # $ gem install telegram_bot | |
| # | |
| # Run the bot | |
| # | |
| # $ ruby bot.rb | |
| # |
| <?php | |
| /** | |
| * Check if the user has submitted the form. | |
| */ | |
| if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
| /** | |
| * Print the $_FILES global variable. This will display the following: | |
| * array(1) { | |
| * ["myfiles"]=> array(6) { |
| /** | |
| * Worker Name: WPCSPC - Device based Cache | |
| * Description: This worker is responsible for caching the requests based on the device type | |
| * Based on Default Worker Version: 2.8.0 | |
| * Version: 2.1.0 | |
| * @link: https://wordpress.org/plugins/wp-cloudflare-page-cache/ | |
| * @link: https://wordpress.org/support/topic/mobile-page-theme-and-cloudflare-caching-plugin-integration/ | |
| * @author: Saumya Majumder | |
| */ | |
| // Default cookie prefixes for cache bypassing |
| <?php | |
| // Replace EMAIL/API_KEY/ZONE_ID with your details. | |
| // Zone ID is on the dashboard for the domain in the bottom right. | |
| // Api keys are generated from the account settings. You must give cache purge permissions | |
| // Place this script on your webserver and point a Github Webhook at it, and you'll clear | |
| // the Cloudflare cache every time you do a push to GH. | |
| $zoneId = "xxx"; | |
| $apiKey = "xxx"; | |
| $email = "xxx"; |
| ((document, location, navigator) => { | |
| const domain = location.hostname.split(".") | |
| const match = document.cookie.match(/(^|; ?)_ga=GA1\.\d\.(\d+\.\d+)(;|$)/) | |
| // use existing client id or generate one | |
| const cid = match ? match[2] : ~~(2147483648 * Math.random()) + "." + ~~(Date.now() / 1000) | |
| // set cookie at highest possible domain level | |
| for (let i = domain.length; i--;) { | |
| const cookie = `_ga=GA1.${domain.length - i}.${cid}` |
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { |