Skip to content

Instantly share code, notes, and snippets.

View LeonDevLifeLog's full-sized avatar
:octocat:
Focusing

Leon LeonDevLifeLog

:octocat:
Focusing
  • nanjing,jiangsu China
View GitHub Profile
@LeonDevLifeLog
LeonDevLifeLog / framework.md
Created August 5, 2018 10:32
框架收集
  • Shiro > 权限管理框架
@LeonDevLifeLog
LeonDevLifeLog / tools.md
Last active August 13, 2018 10:47
小工具收集
@LeonDevLifeLog
LeonDevLifeLog / git.migrate
Created July 30, 2018 03:50 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@LeonDevLifeLog
LeonDevLifeLog / ScannerView.tsx
Last active July 2, 2018 05:36
二维码扫描框
import {Component, default as React} from "react";
import {Animated, Easing, StyleSheet, Text, View} from "react-native";
interface ScannerViewState {
animation: Animated.Value
}
export class ScannerView extends Component<any, ScannerViewState> {
animate: Animated.CompositeAnimation;
@LeonDevLifeLog
LeonDevLifeLog / react-typescript.md
Created July 1, 2018 10:04 — forked from juhaelee/react-typescript.md
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@LeonDevLifeLog
LeonDevLifeLog / README.md
Created June 28, 2018 06:44
技术文档模板
  • 简介(Introduction): [必备] [文件] 提供对产品和文档本身的总体的、扼要的说明

  • 快速上手(Getting Started):[可选] [文件] 如何最快速地使用产品

  • 入门篇(Basics): [必备] [目录] 又称”使用篇“,提供初级的使用教程

    • 环境准备(Prerequisite):[必备] [文件] 软件使用需要满足的前置条件

    • 安装(Installation):[可选] [文件] 软件的安装方法

maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
<repositories>
<repository>
@LeonDevLifeLog
LeonDevLifeLog / SoftKeyBoardListener.java
Last active January 30, 2018 01:35
键盘高度变化监听,转自网络原作者不详
public class SoftKeyBoardListener {
private View rootView;//activity的根视图
int rootViewVisibleHeight;//纪录根视图的显示高度
private OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener;
public SoftKeyBoardListener(Activity activity) {
//获取activity的根视图
rootView = activity.getWindow().getDecorView();
//监听视图树中全局布局发生改变或者视图树中的某个视图的可视状态发生改变
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.41
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"
@LeonDevLifeLog
LeonDevLifeLog / proguard-rules.pro
Created September 29, 2017 01:54
proguard-rules
#############################################
#
# 对于一些基本指令的添加
#
#############################################
# 代码混淆压缩比,在0~7之间,默认为5,一般不做修改
-optimizationpasses 5
# 混合时不使用大小写混合,混合后的类名为小写
-dontusemixedcaseclassnames