Skip to content

Instantly share code, notes, and snippets.

View Danger-Mkh's full-sized avatar
🏠
Working from home

Mostafa Khorashadi Zadeh Danger-Mkh

🏠
Working from home
  • Iran, Mashhad
  • 04:19 (UTC +03:30)
View GitHub Profile
@sadegh19b
sadegh19b / BypassTelegramByCloudflare.md
Last active April 19, 2025 12:00
How to Use Cloudflare Workers to Bypass Telegram

To create a Cloudflare Worker that acts as a bidirectional proxy between your domain and Telegram, follow these steps:

Step 1: Create the Cloudflare Worker Script

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request));
});

async function handleRequest(request) {
@currencysecrets
currencysecrets / calcPL.mq4
Created October 3, 2012 08:41
MQL4: Calculate Profit or Loss on Trade
/**
* This method calculates the profit or loss of a position in the home currency of the account
* @param string sym
* @param int type 0 = buy, 1 = sell
* @param double entry
* @param double exit
* @param double lots
* @result double profit/loss in home currency
*/
double calcPL(string sym, int type, double entry, double exit, double lots) {