Skip to content

Instantly share code, notes, and snippets.

View hxgdzyuyi's full-sized avatar
😀
Happy

hxgdzyuyi

😀
Happy
View GitHub Profile
@hxgdzyuyi
hxgdzyuyi / steam-calculator.js
Last active April 13, 2017 15:53
steam-calculator , 获取 steam 消费总金额
/**
* 获取 steam 消费总金额
* 打开 https://store.steampowered.com/account/history/ 贴入 console 运行
* XXX: 不支持卡片交易之类生成的金额,且当前显示金额为人民币
* 截止 2017/4/13 日,消费约 3526.44 元
*/
var total = 0
, USD_EXCHANGE_RATE = 6
@hxgdzyuyi
hxgdzyuyi / BiliBiliExtractor.php
Created October 9, 2017 06:12
app/Sns/VideoExtractor/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 / YoukuExtractor.php
Created October 10, 2017 01:23
app/Sns/VideoExtractor/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 / backbone-mixin.js
Created September 6, 2012 08:21 — forked from dmitry/backbone-mixin.js
Merge backbone views (mixin pattern)
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
#!/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}
[
'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" => [