Skip to content

Instantly share code, notes, and snippets.

@cjke
cjke / index.html
Created November 20, 2020 03:17
State test
<div id="app"></div>
@cjke
cjke / index.html
Created November 20, 2020 03:16
State test
<div id="app"></div>

Keybase proof

I hereby claim:

  • I am cjke on github.
  • I am cjke (https://keybase.io/cjke) on keybase.
  • I have a public key whose fingerprint is 8A2D B051 971E B0E3 C8F0 B223 4B3A E848 88D5 384D

To claim this, I am signing this object:

Route::get('/foo', function () {
$items = collect(["dog", "cat", "unicorn"])
->reject(function($item) {
return $item == 'cat';
})
->map(function($item) {
var_dump($item); // current item (dog/unicorn);
var_dump($this); // RouteServiceProvider
});
});
test: function(item) {
if(item.split('.').pop() !== 'svg') return false;
var contents = fs.readFileSync(item, 'utf-8');
return contents.includes('<font') && contents.includes('<font-face');
},
loader: 'foofoo'
// return an array of length "wanted" where each value is distrbuted equally among
// the min and the max
distributedValues(min:number, max:number, wanted:number) {
return map(Array(wanted), (_, index) => {
return ((max - min) / (wanted + 1) * (index + 1)) + min;
});
}
// return an array of length "wanted" where the first and last are first "snapped"
// to the min and max respectively, and the remaining values are disstributed equals
@cjke
cjke / list.md
Created November 23, 2016 11:10
Test endpoints for mailchimp JSONP responses
@cjke
cjke / .babelrc
Last active October 30, 2016 13:06
Browserify + Babelify with no Babel presets
{
"plugins": ["transform-es2015-modules-commonjs"]
}
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
@import url(https://fonts.googleapis.com/css?family=Lato:300);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%
}
body {