Skip to content

Instantly share code, notes, and snippets.

View jjyyxx's full-sized avatar

Yuxuan Jiang jjyyxx

View GitHub Profile
@jjyyxx
jjyyxx / PersistentCookieStore.java
Created September 28, 2018 09:24 — forked from franmontiel/PersistentCookieStore.java
A persistent CookieStore implementation for use in Android with HTTPUrlConnection or OkHttp 2. -- For a OkHttp 3 persistent CookieJar implementation you can use this library: https://github.com/franmontiel/PersistentCookieJar
/*
* Copyright (c) 2015 Fran Montiel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jjyyxx
jjyyxx / play.js
Last active April 18, 2018 02:36
xuetangx auto playing
// ==UserScript==
// @name Auto play xuetangx
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Auto play xuetangx! (Support horizontal bar now!)
// @author You
// @match http://tsinghua.xuetangx.com/courses/*
// @grant none
// ==/UserScript==
@jjyyxx
jjyyxx / create-wav-from-buffer.js
Created March 9, 2018 23:59 — forked from revolunet/create-wav-from-buffer.js
web audio + wav buffering
/*
Goal : instantly play any wav source without download the file and without <audio/>
Idea is to use the fetch streaming API and pass raw data to web audio
My use case is playng a wav file
following http://stackoverflow.com/questions/38589614/webaudio-streaming-with-fetch-domexception-unable-to-decode-audio-data/38593356#38593356
@jjyyxx
jjyyxx / makewav.js
Created March 9, 2018 09:59 — forked from asanoboy/makewav.js
How to make a WAV file in Javascript.
var Wav = function(opt_params){
/**
* @private
*/
this._sampleRate = opt_params && opt_params.sampleRate ? opt_params.sampleRate : 44100;
/**
* @private
*/