Skip to content

Instantly share code, notes, and snippets.

View luftreich's full-sized avatar

luftreich

  • MXB.Ltd
  • Shenzhen.China
View GitHub Profile
@luftreich
luftreich / 在线预览本地图片.html
Created July 29, 2016 03:59 — forked from yangsaipp/在线预览本地图片.html
在线预览本地图片,html5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>本地图片在线预览</title>
</head>
<body>
<script type="text/javascript">
var result=document.getElementById("result");
var file=document.getElementById("file");
@luftreich
luftreich / updater-script
Created July 21, 2014 03:10
META-INF/com/google/android/updater-script OTA recovery
assert(getprop("ro.product.device") == "g18ref_th10" ||
getprop("ro.build.product") == "g18ref_th10");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/system", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
@luftreich
luftreich / debian-on-androidatrix-with-debootstrap
Created July 29, 2014 02:44
Debian on Android/Atrix with Debootstrap
http://fooprotected.wordpress.com/2012/04/02/debian-on-androidatrix-with-debootstrap/
Debian on Android/Atrix with Debootstrap
April 2, 2012deathjest3rLeave a commentGo to comments
The Story
I have bought a new Smartphone. No, not the new and shiny Samsung Galaxy Nexus. An already a little bit older model, but still one of the most powerful devices out there, and a lot cheaper then the Galaxy Nexus, the Motorola Atrix 4G. My Nokia N900 served me well for the past 1.5 years, but now it was time for me to jump on the train called Android. But with my new Smartphone I don’t wanted to lose the possibility to use all my favorite Unix tools (e.g. SSH, SCP, RSYNC, etc.). So I decided to search for a guide on how to install Debian on Android. I found a lot, but non of them directly addressed on how to install Debian on Android/Atrix. So I decided to write a short guide for all the Atrix owners out there.
Rooting the Atrix
Before you start with the guide on how to install Debian you have to root your phone, otherwis
@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
@luftreich
luftreich / aml_recovery.log
Created August 6, 2014 06:32
amlogic recovery FAQ
卡升级
Frank Chen
爱上简洁风格模板引子
空片卡升级的过程
启动卡启动 uboot
读取卡上 recovery.img ,启动 recovery.img
recovery 读取参数文件
读取升级包,校验升级包,校验成功,按照升级包的升级脚本,进行
非空片升级的过程
按 power 键 + 特殊键
#!/usr/bin/python
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('0.0.0.0', 6000))
while True:
data, addr = s.recvfrom(1024)
s.sendto(str(addr[1]), addr)
@luftreich
luftreich / docker-gitlab.md
Created March 24, 2017 06:44 — forked from ouyangzhiping/docker-gitlab.md
docker-gitlab部署

docker用来隔离应用还是很方便的,一来本身的操作较为简单,二来资源占用也比虚拟机要小得多,三来也较为安全,因为像数据库这样的应用不会再全局暴露端口,同时应用间的通信通过加密和端口转发,更加安全。

Gitlab是目前比较流行的开源类Github代码管理平台。Gitlab使用Rails开发,使用PostgreSQL或MySQL数据库,Redis做缓存。一般自己搭建私有代码仓库,Gitlab通常是首选。这里简单介绍一下dockerized Gitlab。

Gitlab的docker镜像早已有人做好了,并且维护相当不错。大家可以前往其GitHub仓库了解该镜像的情况。官方repo的readme中已经有详细的安装配置方案,这里我简单的梳理一下部署流程。

安装Docker

这里以Ubuntu 14.04发行版为例,在bash中输入一下命令安装最新的docker:

@luftreich
luftreich / gfw_and_cannon_traceroute.py
Created March 13, 2017 06:54 — forked from jim3ma/gfw_and_cannon_traceroute.py
A Tool for Tracerouting the GC and GFW
#!/usr/bin/env python
import time
import threading
from scapy.all import *
import sys
import socket
maxhop = 25
@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 查找类