راهنمای کامل تونل SSH در Termux
(از صفر تا استفاده)
۱. نصب Termux
از F-Droid نصب کنید:
https://f-droid.org
راهنمای کامل تونل SSH در Termux
(از صفر تا استفاده)
۱. نصب Termux
از F-Droid نصب کنید:
https://f-droid.org
| import os | |
| from dotenv import load_dotenv | |
| from telethon import TelegramClient, events | |
| from telethon.sessions import SQLiteSession | |
| load_dotenv() | |
| API_ID = int(os.getenv("API_ID")) | |
| API_HASH = os.getenv("API_HASH") |
| link: https://stackoverflow.com/questions/38449239/converting-all-the-mp4-audio-files-in-a-folder-to-mp3-using-ffmpeg | |
| # Windows | |
| # first create a folder with name outputs inside video folder | |
| FOR /F "tokens=*" %G IN ('dir /b *.mp4') DO ffmpeg -i "%G" -acodec mp3 "outputs\%~nG.mp3" | |
| ## convert lower quality and size | |
| FOR /F "tokens=*" %G IN ('dir /b *.mp4') DO ffmpeg -i "%G" -acodec mp3 -ab 64000 -ar 22050 "outputs\%~nG.mp3" | |
| # Linux, MacOS |
| # Execute it with elevated permissions | |
| # Description: | |
| # This script install automatically the open-ssh feature and enable it | |
| # enable tls1.2 for downloads | |
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
| # creating openssh folder and download the zip | |
| mkdir c:\openssh-install | |
| cd c:\openssh-install |
| // $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $ | |
| #ifndef YDROL_HASH_MQH | |
| #define YDROL_HASH_MQH | |
| //#property strict | |
| /* | |
| This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark. | |
| Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <forex@NICKNAME.org.uk> | |
| Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> |
| //Resource Link : https://www.forexfactory.com/attachment/file/733647?d=1309582301 | |
| // How to use: | |
| //see this: https://www.forexfactory.com/attachment/image/4292179?d=1663770637 | |
| //then run this script on that chart. | |
| //+------------------------------------------------------------------+ | |
| //| ChangeTemplate-All.mq4 | | |
| //+------------------------------------------------------------------+ | |
| #property copyright "Copyright © 2011, zznbrm" |
| <?php | |
| $ea[0]=array("magic"=>"14001","pipstep"=>"50","numoftrade"=>"2","tp"=>"10,5","sl"=>"30,10"); | |
| $ea[1]=array("magic"=>"14002","pipstep"=>"50","numoftrade"=>"2","tp"=>"15,5","sl"=>"35,20"); | |
| $ea[2]=array("magic"=>"14003","pipstep"=>"50","numoftrade"=>"2","tp"=>"20,5","sl"=>"40,20"); | |
| $ea[3]=array("magic"=>"14004","pipstep"=>"50","numoftrade"=>"2","tp"=>"25,5","sl"=>"40,21"); | |
| $ea[4]=array("magic"=>"14005","pipstep"=>"50","numoftrade"=>"2","tp"=>"30,5","sl"=>"40,22"); | |
| $ea[5]=array("magic"=>"14006","pipstep"=>"50","numoftrade"=>"2","tp"=>"40,5","sl"=>"40,23"); | |
| $ea[6]=array("magic"=>"14007","pipstep"=>"50","numoftrade"=>"2","tp"=>"50,5","sl"=>"40,24"); | |
| $ea[7]=array("magic"=>"14008","pipstep"=>"50","numoftrade"=>"2","tp"=>"60,5","sl"=>"50,30"); |
| # prepare and install tools | |
| sudo su - | |
| sudo yum install epel-release | |
| sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro | |
| sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
| #install unrar | |
| yum install unrar |
| ## ffmpeg convert FLV to MP4 | |
| ffmpeg -i 'input.flv' -vf "scale=2*trunc(iw/2):-2" 'output.mp4' | |
| ## add text subtitles avi to mkv | |
| ffmpeg -i 'input.avi' -i subtitles.srt -scodec copy combined.mkv | |
| string VERSION = "TL BO 1.0"; | |
| // external global variables | |
| extern int EXT_SWINGS = 2; // swing level, 0 is lowest, 2 is most common | |
| extern int EXT_NO_SWING_LMT = 12; // don't consider the latest X bars as swing points to draw trend lines | |
| extern int EXT_ATR = 300; // ATR(x) | |
| extern double EXT_ATR_MAX_SLOPE = 0.05; // multiple of ATR that would be considered maximum slope | |
| extern double EXT_ATR_BUFFER = 0.05; // multiple of ATR to add to low/high for it to be considered a "touch" | |
| extern int EXT_NULL_CLOSES = 0; // number of closes beyond trend line to nullify it as a valid trend line | |
| extern int EXT_NUM_TOUCHES = 3; // (inclusive) number of touches needed to be considered a valid trend line |