Skip to content

Instantly share code, notes, and snippets.

View Jesseyx's full-sized avatar
🎯
Focusing

Jesseyx

🎯
Focusing
  • Shenzhen, China
View GitHub Profile
$emacs libtest.c
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
//
// int
int int_sqrt(int x) {
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@Jesseyx
Jesseyx / AVCDecoderConfigurationRecord.md
Created June 6, 2019 16:00 — forked from uupaa/AVCDecoderConfigurationRecord.md
parse AVCDecoderConfigurationRecord example

以下は、AVCDecoderConfigurationRecord のバイトデータです。

ADDR    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
------ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
000000 00 00 00 2e 61 76 63 43 01 42 c0 1e ff e1 00 16
000010 67 42 c0 1e d9 02 04 68 40 00 00 03 01 40 00 00
000020 03 00 83 c5 8b 92 01 00 05 68 cb 83 cb 20
const chalk = require('chalk')
const msgPath = process.env.GIT_PARAMS
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()
const commitRE = /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build)(\(.+\))?: .{1,50}/
if (!commitRE.test(msg)) {
console.log()
console.error(
` ${chalk.bgRed.white(' ERROR ')} ${chalk.red(`invalid commit message format.`)}\n\n` +
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>getset</title>
</head>
<body>
<div id="test">
<p>{{msg}}</p>
<p>{{msg}}</p>
@Jesseyx
Jesseyx / jsonp.js
Created September 22, 2016 09:16
A jsonp function
function jsonp(options) {
options = options || {};
if (!options.url || !options.jsonp) {
throw new Error('参数不合法');
}
options.data = options.data || {};
// 创建 script
var callbackName = ('jsonp_' + Math.random()).replace('.', '');