Skip to content

Instantly share code, notes, and snippets.

View luftreich's full-sized avatar

luftreich

  • MXB.Ltd
  • Shenzhen.China
View GitHub Profile
package main
import (
"database/sql"
"encoding/json"
"html/template"
"log"
"math/rand"
"net/http"
"runtime"
@luftreich
luftreich / x.log
Created April 8, 2015 11:51
Android Studio 快捷键盘
## Android Studio 快捷键盘
分类: Android屌丝攻城狮 2014-02-25 18:19 2313人阅读 评论(0) 收藏 举报
终于抛弃了卡顿恶心的Eclipse,在使用一个月Android Studio 之后,对Android Studio 的设计实在是非常敬佩,虽然现在Android Studio 版本还处于0.4.5
我使用的Mac下的,但是功能已经很强大了,Android Studio 的Gradle 刚开始不太好用,习惯了之后发现是在是太舒服了,整个工程都是松耦合的。像
插件一样。
虽然Android Studio 你可以自己修改键盘快捷键映射方式,你可以直接选择Eclispse的键盘映射,由于我用的是Mac OS 感觉还是AndroidStudio自带的
键盘挺好用的,在这里大概归类下
Alt+回车 导入包,自动修正
Crtl+X 剪贴 删除本行 ,之前用Eclipse Ctrl+D 就是删除,在AndroidStudio 中是复制本行到下一行,找了好久都没找到删除本行快捷键的 汗
Ctrl+N 查找类
@luftreich
luftreich / _.md
Last active August 29, 2015 14:18 — forked from klange/_.md

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is written in BSD mandoc.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at

Google Play Service を使う

ライブラリプロジェクト google-play-services_lib を読み込む

AndroidManifest.xml に追加

res/AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
@luftreich
luftreich / lua.c
Created January 13, 2015 02:52
Lua.c
/*
** $Id: lua.c,v 1.206.1.1 2013/04/12 18:48:47 roberto Exp $
** Lua stand-alone interpreter
** See Copyright Notice in lua.h
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@luftreich
luftreich / oem_AP6210.patch
Created November 8, 2014 03:09
s805 rtl8189es -> ap6210
diff --git a/device/amlogic/m201_8189_1G/Kernel.mk b/device/amlogic/m201_8189_1G/Kernel.mk
index 6f5159b..e4ce7be 100755
--- a/device/amlogic/m201_8189_1G/Kernel.mk
+++ b/device/amlogic/m201_8189_1G/Kernel.mk
@@ -30,8 +30,8 @@ mkdir -p $(TARGET_OUT)/lib
#cp $(UMP_OUT)/ump.ko $(PRODUCT_OUT)/root/boot/
cp $(MALI_OUT)/mali.ko $(PRODUCT_OUT)/root/boot/
-#cp $(WIFI_OUT)/broadcom/drivers/ap6xxx/broadcm_40181/dhd.ko $(TARGET_OUT)/lib/
-cp $(WIFI_OUT)/realtek/drivers/8189es/rtl8189ES/8189es.ko $(TARGET_OUT)/lib/
@luftreich
luftreich / aml_m201_2014_08_22_20_02_24.patch
Created August 22, 2014 12:04
aml_m201_2014_08_22_20_02_24.patch
project build/
diff --git a/core/main.mk b/core/main.mk
index 6af33f4..b2703c6 100755
--- a/core/main.mk
+++ b/core/main.mk
@@ -60,7 +60,7 @@ $(warning * You are using version $(MAKE_VERSION) of make.)
$(warning * Android can only be built by versions 3.81 and 3.82.)
$(warning * see https://source.android.com/source/download.html)
$(warning ********************************************************************************)
@luftreich
luftreich / power.h
Created August 18, 2014 08:37
power_sysfs_head
#include <linux/suspend.h>
#include <linux/suspend_ioctls.h>
#include <linux/utsname.h>
#include <linux/freezer.h>
struct swsusp_info {
struct new_utsname uts;
u32 version_code;
unsigned long num_physpages;
int cpus;
@luftreich
luftreich / android4.0_pm_suspend.TXT
Last active August 29, 2015 14:05
android4.0 suspend/resume的流程
http://blog.csdn.net/suntao222/article/details/8162938
android4.0 suspend/resume的流程
跟休眠唤醒相关的文件:
[html] view plaincopy
linux_source/kernel/power/main.c
linux_source/kernel/power/earlysuspend.c
linux_source/kernel/power/wakelock.c
@luftreich
luftreich / AML8726-MX-MBOX.lst
Created August 15, 2014 10:04
AML8726-MX-MBOX-REPO-DOC
android_MX/aml_resource/doc/
├── develop_doc
│   ├── hardware
│   │   ├── AML8726-MX DDR3 Layout Guide V1.3.pdf
│   │   ├── AML8726-MX MBOX QPL (4.2.2) 20130605.pdf
│   │   ├── AML8726-MX MID Layout Checklist v1.4.xls
│   │   ├── AML8726-MX MID Layout Guide V1.0.pdf
│   │   ├── AML8726-MX MID QPL (4.1.1) 20130605.pdf
│   │   ├── AML8726-MX MID QPL (4.2.2) 20130605.pdf
│   │   └── AML8726-MXS MXL DDR3_Layout_Guide V0.3.pdf