Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Happy

hxgdzyuyi

😀
Happy
View GitHub Profile
View gist:3952a3e63cd24ed6c5359495c484f0f3
[
'version' => '0',
"id" => "65d68028-7fb5-2af4-1c07-1d08637c0be3",
"detail-type" => "Transcribe Job State Change",
"source" => "aws.transcribe",
"account" => "693032669800",
"time" => "2019-12-03T07:27:09Z",
"region" => "us-east-1",
"resources" => [],
"detail" => [
View git-refresh-branch.sh
#!/bin/bash
LAST_MERGE_COMMIT=`git log --grep="Merge branch" -1 --pretty=format:"%h"`
HEAD_COMMIT=`git show HEAD --summary --pretty=format:"%h"`
git reset --hard ${LAST_MERGE_COMMIT}
git pull upstream master
git cherry-pick ${LAST_MERGE_COMMIT}...${HEAD_COMMIT}
@hxgdzyuyi
hxgdzyuyi / backbone-mixin.js
Created Sep 6, 2012 — forked from dmitry/backbone-mixin.js
Merge backbone views (mixin pattern)
View backbone-mixin.js
define('backbone', ['lib-underscore', 'lib-backbone'], function () {
Backbone.mixin = function (view, mixin, custom) {
if (custom) {
if (custom.events && mixin.events) {
mixin = _.clone(mixin)
_.defaults(custom.events, mixin.events)
}
_.extend(mixin, custom)
}
var source = view.prototype || view
@hxgdzyuyi
hxgdzyuyi / YoukuExtractor.php
Created Oct 10, 2017
app/Sns/VideoExtractor/YoukuExtractor.php
View YoukuExtractor.php
<?php
namespace App\Sns\VideoExtractor;
use GuzzleHttp\Cookie\CookieJar;
use Exception;
/**
* Example:
* url: http://v.youku.com/v_show/id_XMTc1ODE5Njcy.html
@hxgdzyuyi
hxgdzyuyi / BiliBiliExtractor.php
Created Oct 9, 2017
app/Sns/VideoExtractor/BiliBiliExtractor.php
View BiliBiliExtractor.php
<?php
namespace App\Sns\VideoExtractor;
use Exception;
use GuzzleHttp\Cookie\CookieJar;
/**
* Example:
* url: https://www.bilibili.com/video/av3643130/?from=search&seid=12348617167729948450
@hxgdzyuyi
hxgdzyuyi / steam-calculator.js
Last active Apr 13, 2017
steam-calculator , 获取 steam 消费总金额
View steam-calculator.js
/**
* 获取 steam 消费总金额
* 打开 https://store.steampowered.com/account/history/ 贴入 console 运行
* XXX: 不支持卡片交易之类生成的金额,且当前显示金额为人民币
* 截止 2017/4/13 日,消费约 3526.44 元
*/
var total = 0
, USD_EXCHANGE_RATE = 6
View ie-klass.html
<!DOCTYPE html>
<!--[if lt IE 7]><html class="ie6 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7 is-ie" lang="en"> <![endif]-->
<!--[if IE 7]><html class="ie7 lt-ie11 lt-ie10 lt-ie9 lt-ie8 is-ie" lang="en"> <![endif]-->
<!--[if IE 8]><html class="ie8 lt-ie11 lt-ie10 lt-ie9 is-ie" lang="en"> <![endif]-->
<!--[if IE 9]><html class="ie9 lt-ie11 lt-ie10 is-ie" lang="en"> <![endif]-->
<!--[if IE 10]><html class="ie10 lt-ie11 is-ie" lang="en"> <![endif]-->
<!--[if gt IE 10]><!--> <html lang="en"> <!--<![endif]-->
</html>
View gist:8297244
862,1009d861
- .search {
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- }
- .search::after {
- content: " ";
- height: 11px;
- display: block;
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAAWCAYAAABQbS1UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCNUEyNkEzRjE1QTQxMUUyOUE4QkU0NzhENTFFMTgyOCIgeG1wT
View gist:ecc4e30ca09f3fa8ea49
abilities
n.能力,才干
abort
vi.异常中断,中途失败,夭折,流产,发育不全 n.中止计划[任务]
abs
anti-skid brake system,防滑煞车系统;Auto Balance System,自动平衡系统
abstinence
n.节制,节欲,戒酒
academy
n.(高等)专科院校,研究院,学会,学术团体,学院
View iso_time_create.js
define(function() {
if (Date.prototype.toISOString) {
return function() {
return (new Date()).toISOString()
}
}
// modify from http://stackoverflow.com/a/8563517
function pad(number) {
var r = String(number)