Skip to content

Instantly share code, notes, and snippets.

View yimun's full-sized avatar
🤒
Out sick

Linwei Zhang yimun

🤒
Out sick
  • Douban .Inc
  • Beijing, China
View GitHub Profile
@yimun
yimun / .ideavimrc
Created June 7, 2022 07:38
.ideavimrc
set vim-surround
" 修改leader键
let mapleader = ','
let g:mapleader = ','
map <Leader>sa ggVG
" 复制选中区到系统剪切板中
vnoremap <leader>y "+y
vnoremap <leader>p "+p
@yimun
yimun / .gitconfig
Last active April 16, 2024 04:05
祖传git配置
[user]
name = xxx
email = xxx
[alias]
cl = clone
lg = log --color --graph --pretty=log --abbrev-commit
lgs = lg --decorate-refs-exclude=refs/tags
ci = commit
cn = commit --amend --no-edit
st = status
@yimun
yimun / findinaar.sh
Created July 19, 2019 06:58
遍历gradle缓存找到哪个库引入的文件
#!/bin/bash
GRADLE_CACHE=~/.gradle/caches/modules-2/files-2.1/
for item in `find $GRADLE_CACHE -name '*.aar'`
do
unzip -t $item | grep $1
if [ $? -eq 0 ]; then
echo 'Find in' $item
fi
done
@yimun
yimun / useless_br.sh
Last active November 6, 2018 08:05
找到已经合入主分支的无用分支
#!/bin/bash
BR_MAIN='origin/develop'
echo 'All branch already in' $BR_MAIN
echo '-------------------------------'
git fetch origin --prune
for br in `git branch --remote | grep -v HEAD | grep -v ${BR_MAIN}$`
do
{
"code": 0,
"error": "ok",
"result": {
"appId": "48",
"dispatchId": "122AE2B5-1669-44F2-A8A8-8D3FB5097581",
"lastPostId": "0",
"logExtra": [
{
"key": "scene",
@yimun
yimun / Dockerfile
Last active February 26, 2018 13:10
FROM ubuntu:16.04
MAINTAINER ZhangLinwei <yimulinwei@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse\n\
package com.douban.frodo.fangorns.pay.databinding;
import android.databinding.Bindable;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
public abstract class FragmentAdmireCashBinding extends ViewDataBinding {
public final android.widget.TextView admireDesc;
public final android.widget.TextView admireDescTips;
public final android.widget.EditText admireEditDesc;
public final android.widget.ImageView admireEditDescDivider;
public final android.widget.TextView admireFive;
@yimun
yimun / .gitconfig
Last active June 15, 2018 04:12
祖传git配置
[user]
name = yimu
email = yimulinwei@gmail.com
[alias]
cl = clone
lg = log --color --graph --pretty=log --abbrev-commit
ci = commit
cn = commit --amend --no-edit
st = status
co = checkout
public class ThirdPartyAccountHelper {
public static final int TYPE_FB = 0;
public static final int TYPE_TW = 1;
public static final int TYPE_YOUTUBE = 2;
public static final int TYPE_INSTAGRAM = 3;
public static final int TYPE_VK = 4;
public static final String FACEBOOK_ADDRESS = "https://www.facebook.com/app_scoped_user_id/";
public static final String TWITTER_ADDRESS = "https://twitter.com/";
@yimun
yimun / postThreadIdleRunnable.java
Created October 30, 2017 07:21
post runnable when thread idle
private void postThreadIdleRunnable(Looper looper, final Runnable runnable) {
try {
Field field = Looper.class.getDeclaredField("mQueue");
field.setAccessible(true);
MessageQueue queue = (MessageQueue) field.get(looper);
queue.addIdleHandler(new MessageQueue.IdleHandler() {
@Override
public boolean queueIdle() {
runnable.run();
return true;