# 以root用户登录数据库
mysql -u root -p
Enter password:
# 如果你的gitea和mysql是在同一台服务器上,按照下面的创建
mysql> CREATE USER 'gitea' IDENTIFIED BY '密码';
# 对于不在一台服务器上的,则可以按照下面的语句进行创建
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 ratioConfig = (x, y) => ({ | |
x, | |
y, | |
ratio: x / y | |
}) | |
const commonRatio = [ratioConfig(1, 1), ratioConfig(4, 3), ratioConfig(16, 9), ratioConfig(16, 10)]; | |
const getRatioConfig = (x, y) => { |
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
javascript:%22use%20strict%22;%0Alet%20iCloudUrl%20%3D%20location.href;%0Alet%20apiUrl%20%3D%20iCloudUrl.replace(/%5C/shortcuts/g,%20%22/shortcuts/api/records%22);%0Alet%20iCloudApi%20%3D%20new%20XMLHttpRequest();%0AiCloudApi.open(%22GET%22,%20apiUrl);%0AiCloudApi.responseType%20%3D%20%22text%22;%0AiCloudApi.send();%0A%0AiCloudApi.onload%20%3D%20function()%20%7B%0A%20%20let%20apiResult%20%3D%20JSON.parse(iCloudApi.response);%0A%0A%20%20function%20saveData(url)%20%7B%0A%20%20%20%20let%20a%20%3D%20document.createElement(%22a%22);%0A%20%20%20%20document.body.appendChild(a);%0A%20%20%20%20a.style%20%3D%20%22display:%20none%22;%0A%0A%20%20%20%20a.href%20%3D%20url;%0A%20%20%20%20a.download;%0A%20%20%20%20a.click();%0A%20%20%20%20window.URL.revokeObjectURL(url);%0A%20%20%7D%0A%20%20let%20downloadURL%20%3D%20apiResult.fields.shortcut.value.downloadURL;%0A%20%20let%20shortcutName%20%3D%20apiResult.fields.name.value;%0A%20%20let%20finalURL%20%3D%20downloadURL.replace(%22$%7Bf%7D%22,%20shortcutName%20+%20%22.shortcut%22 |
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
https://techviewleo.com/install-parallels-tools-in-kali-linux-virtual-machine/ |
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
extension UIColor { | |
public convenience init(hex: String) { | |
var r: CGFloat = 0 | |
var g: CGFloat = 0 | |
var b: CGFloat = 0 | |
var a: CGFloat = 1 | |
let hexColor = hex.replacingOccurrences(of: "#", with: "") | |
let scanner = Scanner(string: hexColor) | |
var hexNumber: UInt64 = 0 |
- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone [email protected]:owner/git.git
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
//https://juejin.im/post/6844904109800161294 | |
//2020最新移动,联通,电信号码正则 | |
//由于新增了197、199、190等新号段,最新移动,电信,联通号段如下: 移动号段: 134、135、136、137、138、139、147、150、151、152、157、158、159、172、178、182、183、184、187、188、195 、198、197 | |
//联通号段: 130、131、132、145、146、155、156、166、170、171、175、176、185、186、196 | |
//电信号段: 133、141、149、153、173、174、177、179、180、181、189、191、193、199、190 | |
//手机号码验证(号码验证没有特别严谨): | |
function isMobile(s) { | |
let reg = /^1[3|4|5|6|7|8|9][0-9]{9}$/; //验证规则 | |
let flag = reg.test(s); //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
function get_screen_size() { | |
return { | |
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, | |
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight | |
}; | |
} |
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
//.vscode/launch.json | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ |