# Apache Vedio Streaming

## apache支持mp4的流播放

apache可以通过配置模块支持MP4和flv格式的视频流。Mod_h264 and mod_FLV Streaming for Apache 如果需要更多的视频流支持，建议使用 ffserver

# Greasemonkey Script

| Tags: javascript

## how to write a Greasemonkey script

Greasemonkey是火狐下面的一个扩展应用，通过它安装一些用户自定义的脚本，这脚本可以在浏览器运行的时候，对网页进行实时的改变。在chrome上也有一个对应的插件Tampermonkey。 这个工具很强大，我们可以添加自己脚本，来年完成一些我们自己想要完成的功能。

| Tags: git

# Git Workflow

| Tags: git

## 名词

• master分支

master分支保存了最新的发布代码，是稳定分支。永久保存。

• develop分支

保存了最新的下一个版本要发布的feature和bugfix的代码，是稳定分支，但是可以运行在一定时间内不稳定。永久保存。

在没有创建release分支的时候，可以提交bugfix的代码（bug的fix version填写下一个版本的版本号）。一但创建了release分支，那么只能提交下一个版本的feature和bugfix代码。

# Sqlite

| Tags: sqlite

sqlite是一个非常小的数据库,适合小的应用,或者是app之类的.

## install

• windows command line

• windows SqliteBrowser

# Git Tips

| Tags: git

## how to pull after forced update

this willResets the index and working tree. Any changes to tracked files in the working tree since are discarded.

# Git Reference

| Tags: git

## git ref

HEAD is (direct or indirect, i.e. symbolic) reference to the current commit. It is a commit that you have checked in the working directory (unless you made some changes, or equivalent), and it is a commit on top of which “git commit” would make a new one. Usually HEAD is symbolic reference to some other named branch; this branch is currently checked out branch, or current branch. HEAD can also point directly to a commit; this state is called “detached HEAD”, and can be understood as being on unnamed, anonymous branch.

ORIG_HEAD is previous state of HEAD, set by commands that have possibly dangerous behavior, to be easy to revert them. It is less useful now that Git has reflog: HEAD@{1} is roughly equivalent to ORIG_HEAD (HEAD@{1} is always last value of HEAD, ORIG_HEAD is last value of HEAD before dangerous operation).

“pull” or “merge” always leaves the original tip of the current branch in ORIG_HEAD.

HEAD is a moving pointer. Sometimes it means the current branch, sometimes it doesn’t.

# Git Commit Message Convention

| Tags: git

I collect all information for internet, I did not write a single word.

A well-crafted git commit message is the best way to communicate context about a change to fellow developers (and indeed to their future selves)

## examples

example of commit messages:

Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary.  Wrap it to about 72
characters or so.  In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body.  The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a
single space, with blank lines in between, but conventions vary here
- Use a hanging indent


# Apache Maintenance Mode

## How to set devcenter or webconsole into maintenance mode

I found a way to set devcenter or webconsole show maintenance page automatically without restart apache. With the following method, we just touch or remove one file, it will turn on or off the maintenance mode. Basically, I learnt from this page: Redirect-Site-to-Maintenance-Page-using-Apache-and-HTAccess