Skip to content

Instantly share code, notes, and snippets.

View qianjigui's full-sized avatar
🎯
Focusing

WPC qianjigui

🎯
Focusing
View GitHub Profile
@qianjigui
qianjigui / Google Bookmarks
Created September 16, 2009 05:17
Ubiquity: Google-bookmarks-tool
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>Ubiquity Google bookmarks tool</title>
</head>
<body>
<div id="google-bookmarks-search" style="display: none;">
<small>${tipsMessage}</small>
@qianjigui
qianjigui / google-reader ubiquity
Created September 26, 2009 00:56
ubiquity google reader tool
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>Ubiquity Google reader tool</title>
</head>
<body>
<div id="google-reader" style="display: none;">
<small>${tipsMessage}</small>
@qianjigui
qianjigui / ubiquityGmail.js
Created October 15, 2009 00:21
ubiquity Gmail
var gmailAppsDomain = "";
function findGmailTab()(
Utils.tabs.search(/^https?:\/\/mail\.google\.com\/mail\/(?:[?#]|$)/)[0]);
function extractGmailAppsDomain(URL) {
// given a URL, will find the gmail apps domain part of it
if (gmailAppsDomain.length > 0) {
return gmailAppsDomain;
}
@qianjigui
qianjigui / dlptmalloc.c
Last active December 18, 2015 14:09
dlmalloc with Fastbins
/*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
#!/usr/bin/env ruby
#
# encoding: utf-8
#
require 'rexml/document'
require 'erb'
=begin
mmc read <device num> addr blk# cnt
| | | | |
`-------+----------|---|----|-- disk2mem 从device-num中读取 blk# * 512 <-----> (blk# + cnt)*512 的数据到内存(地址以addr开头)中
| | | |
`----------|---|----|-- mmc list
| | |
`---|----|-- memory start address
| |
`----|-- disk start block
|
@qianjigui
qianjigui / CBestPractice_forkrun.c
Last active January 4, 2016 15:59
CBestPractice_forkrun
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/stat.h>
pid_t child;
int childStatus;
@qianjigui
qianjigui / CBestPractice_steps.c
Last active January 4, 2016 18:49
CBestPractice_Steps 用于阶段性处理各流程的状态维护与统一管理
#include <string.h>
#include "step.h"
#include "step_imp.h"
void init_context(char* CONTEXT_FILE_PATH, struct desc_set* set)
{
FILE *fp;
char buff[1024];
char* line;
struct status_step_context * context = set->context;
@qianjigui
qianjigui / android_ndk_log.h
Last active August 29, 2015 13:56
Android NDK C level log
/*
*
* Please Add:
* LOCAL_LDLIBS := -llog
* to Android.mk
*/
#ifndef __ANDROID_APP_LOG__
#define __ANDROID_APP_LOG__ 1
#include <android/log.h>
@qianjigui
qianjigui / aosp_compile.sh
Last active August 29, 2015 13:56
Android Open Source Develop Utils
#!/bin/bash
source build/envsetup.sh
lunch xxxxx
LOG_DIR=clog
CPU_NUM=10
mkdir -p $LOG_DIR
(make -j${CPU_NUM} | tee ${LOG_DIR}/buildresult.std) 3>&1 1>&2 2>&3 | tee ${LOG_DIR}/buildresult.err