<?php
function validateMobile($mobile, $strict = true) {
/*
# 匹配中国大陆国内手机号正则表达式
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui"> | |
<meta name="referrer" content="no-referrer"> | |
<title>dplayer</title> | |
<style> | |
html, body {width:80%;height:80%;margin:auto;overflow:hidden;} | |
</style> |
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 | |
# Script: gif-optimize.sh | |
# Author: Rob Baier | |
# Modifier: ycrao | |
# Description: Script used to optimize animated GIF files. | |
# Dependencies: Gifsicle (https://github.com/kohler/gifsicle) | |
# Environment: Tested on MacOS 10.12. Other *nix environments may require some tweaking. | |
# Usage: ./gif-optimize.sh input-filename.gif |
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 | |
INPUT_FILE=$1 | |
OUTPUT_FILE="$INPUT_FILE.mp4" | |
ffmpeg -i $INPUT_FILE -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" $OUTPUT_FILE |
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
// +build windows | |
package main | |
import ( | |
"fmt" | |
"syscall" | |
"time" | |
"unsafe" | |
) |
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
let [a, b, c] = [1, 2, 3]; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
脚本名称: LOL_CG_Picture_Downloader | |
脚本编码: UTF-8(with BOM) | |
脚本说明: 英雄联盟全英雄原画壁纸下载器 | |
脚本版本: 1.0 | |
脚本作者: 飞扬网络工作室 (fysoft) | |
作者官网: http://raoyc.com/fysoft/ | |
交流Q群: 260655062 | |
运行环境: 作者在编码或测试此脚本时所使用的运行环境为 Windows XP SP3 + AutoHotkey(L) v1.1.09.04,其它相异于此运行环境的,请自行测试脚本兼容性问题 | |
版权申明: 非商业使用,在此脚本基础上所作出的修改,需保留原作者署名信息(作者名和官网链接) |
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
#SingleInstance force | |
#NoTrayIcon | |
yuic_path = %A_ScriptDir%\javabin\yuicompressor-2.4.7.jar | |
batfilename=yuic.bat | |
IfNotExist, %yuic_path% | |
{ | |
Msgbox, YuiCompressor文件缺失,请确保javabin子目录下有yuicompressor-2.4.7.jar文件 | |
ExitApp | |
} | |
IfExist, %yuic_path% |
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
<?php | |
function GetSources($Url,$User_Agent='',$Referer_Url='') //抓取某个指定的页面 | |
{ | |
//$Url 需要抓取的页面地址 | |
//$User_Agent 需要返回的user_agent信息 如“baiduspider”或“googlebot” | |
$ch = curl_init(); | |
curl_setopt ($ch, CURLOPT_URL, $Url); | |
curl_setopt ($ch, CURLOPT_USERAGENT, $User_Agent); | |
curl_setopt ($ch, CURLOPT_REFERER, $Referer_Url); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); |
NewerOlder