Instantly share code, notes, and snippets.

View vpn.json
{
"configs" : [
{
"server" : "119.28.188.189",
"server_port" : 8989,
"password" : "ashaeSCd%",
"method" : "aes-256-cfb",
"remarks" : "tencent-hk"}
,
{
View sql
表1 group表
id group_name
1 g1
2 g2
表2 list表
id name group_id
1 n1 1
2 n2 1
3 n3 2
View nginx-proxy_pass
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
View gist:e8d9615d63837dc70f3b67e6d06269e2
{
"id": "8",
"order_no": "B627456135092948",
"company_id": "1",
"user_id": "3",
"vin": "",
"brand_id": "9",
"series_id": "2488",
"model_id": "30282",
"vehicle_province_id": "24",
View gist:a0cefcf45c4662a0d3bcaa13ac1ca4bb
@import "mixins.less";
// Prefix
@che300-prefix : che300;
@che300-prefix-css :~"@{che300-prefix}-css";
@che300-prefix-btn :~"@{che300-prefix}-btn";
@che300-prefix-tag :~"@{che300-prefix}-tag";
@che300-prefix-pricing :~"@{che300-prefix}-pricing";
// Color
@primary-color : #f6f7fb;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<script>
var source = new EventSource('updates.php');
source.onmessage = function(e) {
var updates;
View ff_ffplay_def.h
/*
* Copyright (c) 2003 Fabrice Bellard
* Copyright (c) 2013-2015 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
View gist:6322b0fb2fdc8467100284df4bf31253
static void VideoCompressonOutputCallback(void *VTref, void *VTFrameRef, OSStatus status, VTEncodeInfoFlags infoFlags, CMSampleBufferRef sampleBuffer)
{
if(!sampleBuffer) return;
CFArrayRef array = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, true);
if(!array) return;
CFDictionaryRef dic = (CFDictionaryRef)CFArrayGetValueAtIndex(array, 0);
if(!dic) return;
BOOL keyframe = !CFDictionaryContainsKey(dic, kCMSampleAttachmentKey_NotSync);
uint64_t timeStamp = [((__bridge_transfer NSNumber*)VTFrameRef) longLongValue];
View ffmpeg.md

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
View Some-Animation-List
1.http://stackoverflow.com/questions/7787494/adding-bounce-effect-to-appearance-of-uiimageview
2.http://stackoverflow.com/questions/20637140/animation-slows-down-as-it-ends/20637179#20637179