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
#!name=阿里云盘签到 | |
#!desc=阿里云盘签到。详情见仓库 | |
#!openUrl=https://github.com/Sliverkiss/QuantumultX | |
#!author=Sliverkiss | |
#!homepage=https://github.com/Sliverkiss/QuantumultX | |
#!icon=https://raw.githubusercontent.com/Softlyx/Fileball/main/YUAN/ALiYun.png | |
[Script] | |
cron "0 7,11 * * *" script-path=https://gist.githubusercontent.com/Sliverkiss/33800a98dcd029ba09f8b6fc6f0f5162/raw/aliyun.js, tag=阿里云盘签到 |
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
FROM alpine:3.9 | |
# trust this project public key to trust the packages. | |
ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub | |
RUN apk --update add ca-certificates \ | |
&& echo "https://dl.bintray.com/php-alpine/v3.9/php-7.3" >> /etc/apk/repositories \ | |
&& apk --update add \ | |
tzdata \ | |
php \ |
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
FROM php:7.3-apache | |
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list | |
RUN sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
git \ | |
zip \ | |
unzip \ |
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
FROM ubuntu:18.04 | |
ARG USER=docker | |
ARG PASS=docker | |
ARG UID=1000 | |
ARG GID=1000 | |
RUN sed -i 's/\(archive\|security\).ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \ | |
&& mkdir /var/run/sshd \ | |
&& apt-get update \ |
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
input:focus::-webkit-input-placeholder, | |
input:focus:-moz-placeholder, /* FF 4-18 */ | |
input:focus::-moz-placeholder, /* FF 19+ */ | |
input:focus:-ms-input-placeholder, /* IE 10+ */ | |
textarea:focus::-webkit-input-placeholder, | |
textarea:focus:-moz-placeholder, | |
textarea:focus::-moz-placeholder, | |
textarea:focus:-ms-input-placeholder { | |
color: transparent; | |
} |
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 | |
function validateDate($date, $format = 'Y-m-d H:i:s') | |
{ | |
$d = DateTime::createFromFormat($format, $date); | |
return $d && $d->format($format) == $date; | |
} | |
var_dump(validateDate('2012-02-28 12:12:12')); # true | |
var_dump(validateDate('2012-02-30 12:12:12')); # false |
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
.ellipsis { | |
width: 100px; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |
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 | |
class Mail { | |
protected $to; | |
protected $from; | |
protected $sender; | |
protected $subject; | |
protected $text; | |
protected $html; | |
protected $attachments = array(); | |
public $protocol = 'mail'; |
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
import sublime | |
import sublime_plugin | |
class OpenedFilesCountPlugin(sublime_plugin.EventListener): | |
def __init__(self): | |
return | |
def on_activated(self, view): |
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 | |
if (count($_POST) > 0) { | |
$res = ''; | |
$text = isset($_POST['text']) ? $_POST['text'] : ''; | |
$pattern = isset($_POST['pattern']) ? $_POST['pattern'] : ''; | |
$eachLine = isset($_POST['each_line']) ? (int)$_POST['each_line'] : 0; | |
if ($pattern) { | |
if ($eachLine == 1) { | |
$text = nl2br($text); | |
$textArr = explode('<br />', $text); |
NewerOlder