Skip to content

Instantly share code, notes, and snippets.

Avatar

Moyang Wang googolmo

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am googolmo on github.
  • I am momowang (https://keybase.io/momowang) on keybase.
  • I have a public key ASDXezlaKS8yaFlbUqmCKDn2RSWntPFOFw5dQr6uncXR7wo

To claim this, I am signing this object:

@googolmo
googolmo / blinks2.zsh-theme
Created Mar 7, 2018
config for oh_my_zsh
View blinks2.zsh-theme
# https://github.com/blinks zsh theme
# This theme works with both the "dark" and "light" variants of the
# Solarized color schema. Set the SOLARIZED_THEME variable to one of
# these two values to choose. If you don't specify, we'll assume you're
# using the "dark" variant.
case ${SOLARIZED_THEME:-dark} in
light) bkg=white;;
*) bkg=black;;
@googolmo
googolmo / init.vim
Last active Mar 8, 2018
NeoVim Config
View init.vim
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
call plug#begin("~/.local/share/nvim/plugged")
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
Plug 'roxma/nvim-completion-manager'
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
View simple-obfs.rb
# Documentation: http://docs.brew.sh/Formula-Cookbook.html
# http://www.rubydoc.info/github/Homebrew/brew/master/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class SimpleObfs < Formula
desc "Simple-obfs is a simple obfusacting tool, designed as plugin server of shadowsocks."
homepage "https://github.com/shadowsocks/simple-obfs"
url "https://github.com/shadowsocks/simple-obfs/archive/v0.0.2.tar.gz"
sha256 "cfd7b847be57401e1c664662781d41bc5b089b341232d94375ca4dd612b3852f"
View copy_file_to_jniLibs.gradle
android.LibraryVariant.all { variant ->
if (variant.packageLibrary) {
def originFolder = ""
copy {
from "$originFolder"
into variant.packageLibrary.jniDir
}
}
}
View layout.xml
<android.support.design.widget.AppBarLayout
android:layout_height="192dp"
android:layout_width="match_parent">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
View API User-Agent
public static String generateUserAgent() {
StringBuilder builder = new StringBuilder("Android/");
builder.append(Build.VERSION.SDK_INT);
builder.append(" ");
builder.append(Build.BRAND.replace(" ", "_"));
builder.append("/");
builder.append(Build.MODEL.replace(" ", "_"));
builder.append(" ");
builder.append(Build.MANUFACTURER.replace(" ", "_"));
builder.append("/");
View BookingAppCrash
07-23 16:25:22.739 7749-7749/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.booking, PID: 7749
java.lang.ExceptionInInitializerError
at com.booking.common.exp.ExperimentsServer.init(ExperimentsServer.java:242)
at com.booking.common.exp.ExperimentsServer.getInstance(ExperimentsServer.java:93)
at com.booking.common.exp.ExperimentsServer.getInstance(ExperimentsServer.java:99)
at com.booking.common.data.Squeak$SqueakBuilder.getInformation(Squeak.java:152)
at com.booking.common.data.Squeak$SqueakBuilder.attachClientDetails(Squeak.java:263)
at com.booking.common.data.Squeak$SqueakBuilder.attach(Squeak.java:235)
at com.booking.DynamicLoaderLiveHelper.hasLoadedCodeDynamically(DynamicLoaderLiveHelper.java:151)
View ResizeAnimation.java
public class ResizeAnimation extends Animation {
final int startWidth;
final int targetWidth;
View view;
public ResizeAnimation(View view, int targetWidth) {
this.view = view;
this.targetWidth = targetWidth;
startWidth = view.getWidth();
}