Skip to content

Instantly share code, notes, and snippets.

View einverne's full-sized avatar
🥝
Focusing

Ein Verne einverne

🥝
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am einverne on github.
  • I am einverne (https://keybase.io/einverne) on keybase.
  • I have a public key ASA_chuOMfxDNGwcz8Crmjv_FqkkCsHfVdYVhHme7NcIWQo

To claim this, I am signing this object:

@einverne
einverne / 00.howto_install_phantomjs.md
Created March 22, 2017 07:57 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@einverne
einverne / LocalBroadcastExampleActivity.java
Created September 6, 2016 14:41 — forked from Antarix/LocalBroadcastExampleActivity.java
Simple Example of using LocalBroadcastManager in Android
import android.app.Activity;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.content.LocalBroadcastManager;
@einverne
einverne / android_studio_shortcuts.md
Last active May 18, 2016 06:35 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
@einverne
einverne / assets
Created December 3, 2014 09:20
get file content from Android assets
//从assets 文件夹中获取文件并读取数据
public String getFromAssets(String fileName) {
String result = "";
try {
InputStream in = getResources().getAssets().open(fileName);
// 获取文件的字节数
int lenght = in.available();
// 创建byte数组
byte[] buffer = new byte[lenght];
// 将文件中的数据读到byte数组中
# luna_pinyin.custom.yaml
#
# 【朙月拼音】模糊音定製模板
# 佛振配製 :-)
#
# 位置:
# ~/.config/ibus/rime (Linux)
# ~/Library/Rime (Mac OS)
# %APPDATA%\Rime (Windows)
#
@einverne
einverne / ffdy.user.js
Created May 23, 2014 14:49
放放电影获取迅雷链接
// ==UserScript==
// @name Xunlei Download link for ffdy.cc
// @namespace http://www.einverne.tk
// @version 2013.11.10
// @description find the download link for xunlei
// @match http://www.ffdy.cc/teleplay/*
// @match http://www.ffdy.cc/movie/*
// @copyright 2013+, einverne
// ==/UserScript==
@einverne
einverne / Auto_Check.user.js
Created May 23, 2014 14:46
百度知道自动签到,虾米自动签到
// ==UserScript==
// @name Auto Check
// @namespace http://www.einverne.tk/
// @version 2014.05.23
// @description 百度知道自动签到,虾米自动签到
// @match http://zhidao.baidu.com/question/*
// @match http://*.xiami.com/*
// @copyright 2012+, einverne
// ==/UserScript==