Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Meng Ye jk2K

💭
I may be slow to respond.
Block or report user

Report or block jk2K

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jk2K
jk2K / push_multi_repo_to_gitlab.sh
Created May 6, 2019
推送多个仓库到 GitLab, 支持 GitLab API v4
View push_multi_repo_to_gitlab.sh
#!/bin/bash
# 自动创建组和仓库,自动上传仓库
# 配置选项
gitlab_access_token='your personal access token'
gitlab_base_url='http://gitlab.demo.com/api/v4'
repositorys=(
"xxxx"
"xxxx"
)
@jk2K
jk2K / # php - 2019-02-14_00-08-16.txt
Created Feb 13, 2019
php on Ubuntu 18.04.1 LTS - Homebrew build logs
View # php - 2019-02-14_00-08-16.txt
Homebrew build logs for php on Ubuntu 18.04.1 LTS
Build date: 2019-02-14 00:08:16
@jk2K
jk2K / extract_realm_database_android.sh
Last active Jun 11, 2019 — forked from medyo/extract_realm_database_android.sh
how to export realm database, work on Android 5.0+
View extract_realm_database_android.sh
#!/bin/bash
ADB_PATH="/Users/lee/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.yourcompany.app"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/lee/Downloads/${DB_NAME}"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else
@jk2K
jk2K / fir-publisher
Created Sep 7, 2016
上传 APK 到 fir.im 上,Bash 脚本,无需依赖 Ruby
View fir-publisher
#!/bin/bash
# Get API Token from http://fir.im/apps
API_TOKEN="your API token"
PACKAGE_PATH="demo-release.apk"
# ios or android
TYPE="android"
# App 的 bundleId
BUNDLE_ID="com.demo.app"
@jk2K
jk2K / gulpfile.js
Created May 9, 2016
gulp + nodemon + browser-sync
View gulpfile.js
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');
var browserSync = require('browser-sync');
gulp.task('nodemon', function () {
browserSync.init({
proxy: "localhost:8000",
open: false,
// we'd need a slight delay to reload browsers connected to browser-sync after restarting nodemon
reloadDelay: 2000,
@jk2K
jk2K / ZoomableDraweeView.java
Last active Jan 18, 2018 — forked from nbarraille/PinchToZoomScaleDetector.java
Implement pinch zoom and drag in fresco library
View ZoomableDraweeView.java
package com.xmeise.mm;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
@jk2K
jk2K / DividerItemDecoration.java
Created Nov 10, 2015
android RecyclerView ItemDecoration class
View DividerItemDecoration.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
@jk2K
jk2K / github_post_recieve.php
Created Sep 21, 2015 — forked from cowboy/github_post_recieve.php
GitHub PHP webhook to auto-pull on repo push
View github_post_recieve.php
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull 2>& 1' );
echo 'success';
}
@jk2K
jk2K / appcrush.py
Created May 26, 2015
appcrush.rb的python版本
View appcrush.py
# coding=utf-8
import os
import sys
import glob
pngcrush = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush"
destination = os.path.join(os.environ['HOME'], 'Desktop')
for ipa in sys.argv:
@jk2K
jk2K / mac
Last active Aug 22, 2018
Vim配置文件 .vimrc
View mac
"不兼容vi
set nocompatible
"让删除键更好用
set backspace=2
"不创建撤销文件
set noundofile
"取消自动备份
set nobackup
"自动缩进
set autoindent
You can’t perform that action at this time.