Skip to content

Instantly share code, notes, and snippets.

View ssured's full-sized avatar
🙊
\> say "ssured"

Sjoerd de Jong ssured

🙊
\> say "ssured"
View GitHub Profile
const transparentProxyHandler = {
getPrototypeOf(target: object) {
return Reflect.getPrototypeOf(target);
},
setPrototypeOf(target: object, v: any) {
return Reflect.setPrototypeOf(target, v);
},
isExtensible(target: object) {
return Reflect.isExtensible(target);
},
@ssured
ssured / README.md
Created December 14, 2017 11:21 — forked from DesignByOnyx/README.md
A script for setting up a project to use semantic-ui-less

This script was inspired by this blog post - however I found the technique to be a little insufficient. Many thanks to Artem Butusov as I would not have been able to do this without his blog post.

This script is intended to be used with semantic-ui-react projects. If you are just using semantic-ui, then you may need to do some other troubleshooting... I don't know as I haven't tested. From what I can tell everything should work just fine.

Before we get started

This process is completely different from the one described in the blog post above. This script is intended to do everything for you - no manual copying or updating code is required. If you have already followed

import { types as t, flow, getEnv, getType } from 'mobx-state-tree';
it('eagerly loads referenced objects', async () => {
expect.assertions(1);
const Author = t.model('Author', {
id: t.identifier(t.string),
name: t.string,
});
<!doctype html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/comlinkjs/comlink.global.js"></script>
<script>
const api = {
add(a,b){
return new Promise(resolve => resolve({result: a + b}));
}
};
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
var getAttachmentQueue = {};
var getAttachmentActive = {};
var getAttachmentCount = 0;
var getAttachmentConcurrency = 10;
function processQueue() {
console.log('processQueue', getAttachmentCount, Object.keys(getAttachmentActive).length, Object.keys(getAttachmentQueue).length);
while (Object.keys(getAttachmentActive).length < getAttachmentConcurrency && Object.keys(getAttachmentQueue).length > 0) {
var key = Object.keys(getAttachmentQueue)[0];
var args = getAttachmentActive[key] = getAttachmentQueue[key];
This file has been truncated, but you can view the full file.
this is from ios running 9.3.2 safari
[Mon, 18 Jul 2016 19:39:00 GMT]
[Mon, 18 Jul 2016 19:41:36 GMT] [info] [<0.16761.2>] 127.0.0.1 - - GET /_log?bytes=1000000 200
[Mon, 18 Jul 2016 19:42:28 GMT] [info] [<0.2301.0>] Starting index update for db: st_users idx: _design/auth
[Mon, 18 Jul 2016 19:42:28 GMT] [info] [<0.2301.0>] Index update finished for db: st_users idx: _design/auth
[Mon, 18 Jul 2016 19:42:28 GMT] [info] [<0.16702.2>] 127.0.0.1 - - POST /_users/_bulk_docs 201
[Mon, 18 Jul 2016 19:42:28 GMT] [info] [<0.16782.2>] 127.0.0.1 - - GET /st_users_settings%24info(40)bta(2d)assen(2e)nl/ 200
[Mon, 18 Jul 2016 19:42:28 GMT] [info] [<0.16940.2>] 127.0.0.1 - - GET /database/ 200
@ssured
ssured / gist:f8c63988bfdd8a067402
Created December 7, 2015 11:24 — forked from glynthomas/gist:9103273
HTML5 File API thumbnail : EXIF orientation tag (lightweight fix)
<!DOCTYPE html>
<head>
<title>HTML5 Camera Fun</title>
</head>
<style type="text/css">
.crop-canvas {
bottom: -30px;
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
model: { key: 'test value' },
myComponent: Ember.Component.create({
template: Ember.Handlebars.compile("myComponent")
}),