Skip to content

Instantly share code, notes, and snippets.

@googolmo
googolmo / keybase.md
Created April 1, 2018 00:17
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 March 7, 2018 06:16
config for oh_my_zsh
# 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 March 8, 2018 03:25
NeoVim Config
" 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': '*' }
@googolmo
googolmo / simple-obfs.rb
Created February 4, 2017 07:32
simple-obfs-brew
# 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"
@googolmo
googolmo / file_dir.md
Created February 24, 2016 08:56
Android File Dir

##File Dir

android.LibraryVariant.all { variant ->
if (variant.packageLibrary) {
def originFolder = ""
copy {
from "$originFolder"
into variant.packageLibrary.jniDir
}
}
}
@googolmo
googolmo / layout.xml
Created September 16, 2015 13:56
Qyer
<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"
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("/");
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)
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();
}