- Git commit template
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 Java.text.NumberFormat; | |
public class Test { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Double myNumber=23323.3323232323; |
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
将EditText属性设置修改 | |
android:background="@null" |
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 class RegexUtils { | |
/** | |
* 密码是否正确 | |
*/ | |
public static final String PASSWORD_REGEX = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$"; | |
/** | |
* 匹配全网IP的正则表达式 | |
*/ | |
public static final String IP_REGEX = "^((?:(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d))))$"; |
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 class DataBindingRecyclerViewAdapter extends RecyclerView.Adapter<DataBindingRecyclerViewAdapter.DataBindingViewHolder> { | |
public static final int TYPE_HEADER = 1, TYPE_FOOTER = 2, TYPE_NORMAL = 0; | |
public OnBindingViewHolderListener onBindingViewHolderListener; | |
Context mContext; | |
int mLayoutId; | |
int mVarId; | |
boolean haveHeader = false; | |
boolean haveFooter = false; | |
View headerView, footerView; |
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
android { | |
compileSdkVersion 25 | |
buildToolsVersion "25.0.3" | |
defaultConfig { | |
applicationId "com.***************************.shb" | |
minSdkVersion 19 | |
targetSdkVersion 25 | |
versionCode 1 | |
versionName '1.0.0' | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Make config file:
sudo nano /etc/nginx/sites-available/bot.conf
Then copy and paste bot.conf
content and edit YOUR.DOMAIN strings. Now install Let's Encrypt on your server. For example in Debian you need to add jessie-backports
and easily install it with apt-get
:
sudo apt-get install -t jessie-backports letsencrypt
Then get cert for you domain:
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 class="no-js consumer" data-country="cn" lang="zh-CN"> | |
<head> | |
<script> | |
var a=location.href.match(/platform=(win8|win|mac|linux|cros|ios)/),b=window.navigator.userAgent;document.documentElement.id=a&&a[1]||(-1<b.indexOf("Windows NT 6.2")?"win8":-1<b.indexOf("iPad")?"ios":-1<b.indexOf("Windows")?"win":-1<b.indexOf("Mac")?"mac":-1<b.indexOf("CrOS")?"cros":"linux"); | |
if(-1<b.indexOf("MSIE")){var c=-1<b.indexOf("MSIE 6")?" lt-ie10 lt-ie9 lt-ie8 lt-ie7 ie6":-1<b.indexOf("MSIE 7")?" lt-ie10 lt-ie9 lt-ie8 ie7":-1<b.indexOf("MSIE 8")?" lt-ie10 lt-ie9 ie8":-1<b.indexOf("MSIE 9")?" lt-ie10 ie9":-1<b.indexOf("MSIE 10")?" ie10":"";""!==c&&(document.documentElement.className+=c)}if(-1<b.indexOf("Windows NT 5.1")||-1<b.indexOf("Windows NT 5.2"))document.documentElement.className+=" winXP"; | |
</script> | |
<script src="//www.gstatic.com/external_hosted/modernizr/modernizr.js"> |
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
find ./ -name "*.png" -exec cwebp -q 70 {} -o {}.webp \; |
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
docker run -d -v /home/leon/共享:/home/vsftpd \ | |
-p 20:20 -p 21:21 -p 47400-47470:47400-47470 \ | |
-e FTP_USER=user \ | |
-e FTP_PASS=123456 \ | |
-e PASV_ADDRESS=0.0.0.0 \ | |
--name ftp \ | |
--net=host \ | |
--restart=always bogem/ftp |
OlderNewer