This file contains hidden or 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
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
// $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) <[email protected]> | |
Copyright (C) 2002, 2004 Christopher Clark <[email protected]> |
This file contains hidden or 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
//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" |
This file contains hidden or 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 | |
$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"); |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
## 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 | |
This file contains hidden or 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
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 |
This file contains hidden or 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 | |
$zipfile= __DIR__.'/bot.zip'; | |
Zip(__DIR__.'/bot/',$zipfile); | |
unzip($zipfile, __DIR__.'/a'); | |
function Zip($source, $destination) | |
{ | |
if (!extension_loaded('zip') || !file_exists($source)) { |
This file contains hidden or 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
# TA-Lib Trader PHP extension A PECL extension in centos 7 | |
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 | |
# To install PECL extensions: | |
sudo yum install php-devel |
NewerOlder