Skip to content

Instantly share code, notes, and snippets.

View blittle's full-sized avatar
🇺🇦

Bret Little blittle

🇺🇦
View GitHub Profile
@blittle
blittle / cloudSettings
Last active September 17, 2021 14:59 — forked from joeldenning/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-17T14:59:17.023Z","extensionVersion":"v3.4.3"}
test
@blittle
blittle / babel-types.md
Created April 13, 2020 21:25 — forked from joshblack/babel-types.md
Documentation of all the Babel type methods

Babel Types

Hopefully will be documentation of unclear methods available for Babel Types

  • is
  • isType
  • shallowEqual
  • appendToMemberExpression
  • prependToMemberExpression
  • ensureBlock

@lovedota this is definitively possible with webpack if you use the tried and true AMD module specification as the output target in your webpack bundles. You will also need to treat each app as an external for each other app. For example, in the webpack configuration for each of your micro-apps:

module.exports = {
  output: {
    library: "app1", // for subsequent apps, change them to a different name
    libraryTarget: "amd"
  },
  ...
 externals: [
@blittle
blittle / overrides.html
Last active August 14, 2017 22:54
overrides
<!DOCTYPE html>
<html>
<body>
<script>
import(`${getDomain()}/app.js`);
function getDomain() {
const override = localStorage.getItem('override');
if (override === 'beta') return 'https://beta.myapp.com';
@blittle
blittle / dynamic.html
Created August 14, 2017 21:40
dynamic
<!DOCTYPE html>
<html>
<body>
<script>
// RequireJS
requirejs('dist/app.js');
// SystemJS
SystemJS.import('dist/app.js');
@blittle
blittle / index.html
Created August 14, 2017 21:39
simple-example
<!DOCTYPE html>
<html>
<body>
<script src="dist/app.js"></script>
</body>
</html>

A couple thoughts about http://www.nationalreview.com/article/444370/donald-trump-refugee-executive-order-no-muslim-ban-separating-fact-hysteria

1)

In 2002, the United States admitted only 27,131 refugees. It admitted fewer than 50,000 in 2003, 2006, and 2007. As for President Obama, he was slightly more generous than President Bush, but his refugee cap from 2013 to 2015 was a mere 70,000, and in 2011 and 2012 he admitted barely more than 50,000 refugees himself.

So we didn't admit many refugees under Bush or Obama. So three wrongs now make a right?

2)

@blittle
blittle / test.js
Last active January 6, 2017 00:24
import {catchAsyncStacktrace} from 'auto-trace';
function getPost(post) {
return fetch(`https://jsonplaceholder.typicode.com/posts/${post.id}`)
.then(resp => {
if (resp.ok) return resp.json();
else throw `Error retrieving post with id: ${post.id}`;
})
}
// Static imports
import auth from 'auth-service!sofe';
const user = auth.getLoggedInUser();
// Asynchronous imports
System.import('auth-service!sofe')
.then(auth => auth.getLoggedInUser());