I hereby claim:
- I am mutoo on github.
- I am mutoo (https://keybase.io/mutoo) on keybase.
- I have a public key ASDbSW7pFHQ_32gL81HZ2l21cLR5IJKLjaWbREfUi7ZcbAo
To claim this, I am signing this object:
4602713413433154453264452332101823124660178999927878775099623274628544000826084520729275137386306313610970039542134019169094479911539667758765706548388262709395910401447414275192972397095100372901062558411172027994823308339118707411212899705108784191046990030246902890430162768476917897544323686963363526638329586402598537684995297467531450584152322402629527753056672068582799976452955077140364435633611627743030006882994464389706629103466042439399187818912431754020828466328554047723057801189261674789207224541262917263083945860320625674536625026002950952262398064897919271988481419068961330802400103216397852978258771045078666755642257479872208814339437518538616439414227876160324202838202693667701117389124410449965409845122982315624918113650650381630365765220616683628335407025058495890159377056162851945512758383382009140042967905216072731650772908134476998576255535178729325770930240128556117231001128605001837891938772915337002956920498855579997481972474558715755099585396947510028754873131439722605891277408245136842 |
const { getOptions } = require('loader-utils'); | |
const validateOptions = require('schema-utils'); | |
const css = require('css'); | |
const schema = require('./options.json'); | |
/** | |
* This loader parses the key/value pairs from the font style.css into an array | |
*/ | |
module.exports = function loader(source) { | |
const options = getOptions(this) || {}; |
{ | |
"a": { | |
"b": [ | |
{ | |
"id": 301940, | |
"slug": "ef4f2422125f", | |
"nickname": "说", | |
"avatar_source": "asdfsd", | |
"total_likes_count": 28553, | |
"total_wordage": 1373341, |
// react.js | |
const SagaRequestDemo = () => { | |
const sagaRequest = useSagaRequest(); | |
const loadUser = () => { | |
sagaRequest.dispatch(fetchUser({ id: 'mutoo' })) | |
.then((data) => { | |
console.log(`fetch user success: ${data}`); | |
}) | |
.catch((err) => { |
(()=>{ | |
// hijack the fillText function to collect characters info | |
const c2d = CanvasRenderingContext2D.prototype; | |
const data = []; | |
const oldFillText = c2d.fillText; | |
c2d.fillText = function() { | |
const [char,x,y] = arguments; | |
data.push({ | |
char, | |
x, |
Array.prototype.slice.call(document.querySelectorAll('span[data-wr-id]')).sort((a,b)=>{ | |
if (a.offsetTop != b.offsetTop) { | |
return a.offsetTop - b.offsetTop | |
} else { | |
return a.offsetLeft - b.offsetLeft; | |
} | |
} | |
).map((s)=>s.innerText).join(''); | |
// test on this page |
I hereby claim:
To claim this, I am signing this object:
// inspired by https://twitter.com/nixcraft/status/1162020669242003456 | |
console.log('Roses are red, violets are blue.'); | |
// ooooooooo. | |
// `888 `Y88. | |
// 888 .d88' .ooooo. .oooo.o .ooooo. .oooo.o .oooo. oooo d8b .ooooo. | |
// 888ooo88P' d88' `88b d88( "8 d88' `88b d88( "8 `P )88b `888""8P d88' `88b | |
// 888`88b. 888 888 `"Y88b. 888ooo888 `"Y88b. .oP"888 888 888ooo888 | |
// 888 `88b. 888 888 o. )88b 888 .o o. )88b d8( 888 888 888 .o |
# define an exception for flow control | |
class ELSE(Exception): pass | |
# since we cannot write: `condition or raise ELSE()` => (syntax error) | |
# we need to define a func to raise an exception | |
def THEN(): | |
raise ELSE() | |
# define our IF to make it looks intuitive | |
def IF(condition): |