| title | description | date | categories | slug | |
|---|---|---|---|---|---|
QQ协议分析 |
QQ协议分析 |
2014-04-16 |
|
qq-protocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Terminal Commands: | |
| One webcam: | |
| ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE | |
| Two webcam overlay: | |
| ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Backs up the OpenShift PostgreSQL database for this application | |
| # by Skye Book <[email protected]> | |
| NOW="$(date +"%Y-%m-%d")" | |
| FILENAME="$OPENSHIFT_DATA_DIR/$OPENSHIFT_APP_NAME.$NOW.backup.sql.gz" | |
| find $OPENSHIFT_DATA_DIR -name $OPENSHIFT_APP_NAME.*backup* -type f -mtime +30 -exec rm '{}' \; | |
| pg_dump $OPENSHIFT_APP_NAME | gzip > $FILENAME | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- Stubs for entity.* callbacks defined in C++. | |
| -- | |
| -- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only. | |
| -- | |
| -- Entity callbacks query and mutate the specific entity that is running the | |
| -- lua script. They can be called from a _different_ entity using | |
| -- world.callScriptedEntity(targetEntityId, "entity.*"), replacing "*" with the | |
| -- name of a function defined below. | |
| -- | |
| -- Specific types of entities (e.g. NPCs, Objects) define different sets of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Doubly Linked List implementation */ | |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Node { | |
| int data; | |
| struct Node* next; | |
| struct Node* prev; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Backs up the OpenShift PostgreSQL database for this application | |
| # by Skye Book <[email protected]> | |
| NOW="$(date +"%Y-%m-%d")" | |
| FILENAME="$OPENSHIFT_DATA_DIR/$OPENSHIFT_APP_NAME.$NOW.backup.sql.gz" | |
| pg_dump $OPENSHIFT_APP_NAME | gzip > $FILENAME |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
NewerOlder