After python-telegram-bot > 20.4 bot.send_message as async method
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
FROM ubuntu | |
RUN apt update \ | |
&& apt install -y wget curl git net-tools python3 python3-distutils nginx vim htop openssh-server \ | |
&& mkdir -p /root/download && cd /root/download \ | |
&& wget https://bootstrap.pypa.io/get-pip.py \ | |
&& python3 get-pip.py \ | |
&& pip install virtualenv \ | |
&& mkdir -p /var/run/sshd \ | |
&& echo 'root:123' |chpasswd \ |
Issue Link : docker-archive/toolbox#673 (comment)
I use the workaround described by dsebastien in the issue linked in my previous reply with a small modification to avoid changing the calling shell environment. This is what I use as workaround now, in my ~/.bash_profile on Windows 10, Git Bash:
# Workaround for Docker for Windows in Git Bash.
docker()
{
(export MSYS_NO_PATHCONV=1; "docker.exe" "$@")
}
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
#!/bin/bash | |
# Database credentials | |
user="xxx" | |
password="xxx" | |
host="xxx" | |
db_name="xxxx" | |
# Other options | |
backup_path="/data/backup/mysql" |
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
#!/bin/bash | |
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r' | |
} | |
GetAndroidVersion () { | |
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \ | |
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0") | |
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')} | |
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2 |
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
#!/bin/bash | |
ADBShell () { adb ${2+-s} $2 shell "$1" | tr -d '\r' | |
} | |
GetAndroidVersion () { | |
GOOGLE_SOURCE="https://android.googlesource.com" | |
REPO="platform/frameworks/base" | |
ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \ | |
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0") |
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
import requests | |
import random | |
import time | |
def post_loc(users): | |
def get_loc(datas): | |
session = requests.session() | |
session.post("https://www.hostloc.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1",data=datas) | |
for x in range(0,10): | |
session.get(f'https://www.hostloc.com/space-uid-{random.randint(20000,30000)}.html') | |
time.sleep(random.randint(2,5)) |
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
public static string SvgImage(Item item, string fieldName, string parameters = "") | |
{ | |
if (item == null || string.IsNullOrEmpty(fieldName)) | |
return string.Empty; | |
ImageField field = item.Fields[fieldName]; | |
if (field?.MediaItem == null) | |
return $"<!--This field name :{fieldName} is not image field.-->"; | |
var mediaItem = new MediaItem(field.MediaItem); | |
if (mediaItem.MimeType != "image/svg+xml" || Sitecore.Context.PageMode.IsExperienceEditor) | |
return Sitecore.Web.UI.WebControls.FieldRenderer.Render(item, fieldName, parameters); |
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
#!/bin/sh | |
#file path | |
#/jffs/scripts/services-start | |
cru a frpc "10 * * * * /bin/sh /jffs/frp/auto.sh" |
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
contains() { | |
string="$1" | |
substring="$2" | |
if test "${string#*$substring}" != "$string" | |
then | |
echo "# $substring is in $string" | |
return 0 # $substring is in $string | |
else | |
echo "# $substring is not in $string" | |
return 1 # $substring is not in $string |