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
const USER_AGENTS = [] | |
/** | |
* 生成随机数字 | |
* @param {number} min 最小值(包含) | |
* @param {number} max 最大值(不包含) | |
*/ | |
function randomNumber(min = 0, max = 100) { | |
return Math.min(Math.floor(min + Math.random() * (max - min)), max); | |
} |
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
--[[ | |
PID Controller for Lua | |
Ported from https://github.com/br3ttb/Arduino-PID-Library/ | |
--]] | |
local function millis() | |
return os.clock() * 1000 | |
end |
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
#!/usr/bin/env bash | |
echo $1 | |
echo $2 | |
echo $0 | |
if [[ "$1" == "" && "$2" == "" ]]; then | |
echo NULL | |
exit 1 | |
fi | |
#exit 0 | |
mkdir "$1" |
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
--[[ json.lua | |
A compact pure-Lua JSON library. | |
The main functions are: json.stringify, json.parse. | |
## json.stringify: | |
This expects the following to be true of any tables being encoded: | |
* They only have string or number keys. Number keys must be represented as | |
strings in json; this is part of the json spec. |
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
#!/usr/bin/perl | |
# Create index.html with a list of all files. | |
# Written by Ilya Zverev, licensed WTFPL. | |
use strict; | |
use POSIX qw(strftime); | |
use HTML::Template; | |
use File::Basename; | |
use Getopt::Long; |
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 | |
# | |
# This script was inspired by http://blog.diogot.com/blog/2013/09/18/static-libs-with-support-to-ios-5-and-arm64/ | |
# | |
# This script uses a temporary folder for intermediate build products. | |
# | |
# Minimum deployment target is 5.0 for 32 bit architectures and for 64 bit architectures it is 7.0. | |
# |
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 -v | |
MYDIR=`pwd` | |
#MYDIR=$(cd $(dirname $0) && pwd) | |
IPA="$1" | |
PROVISION="$2" | |
CERTIFICATE="$3" | |
usage() { |