Skip to content

Instantly share code, notes, and snippets.

Emelia Smith ThisIsMissEm

Block or report user

Report or block ThisIsMissEm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ThisIsMissEm
ThisIsMissEm / package.json
Last active Apr 6, 2019
Concept for multi-registry support in package.json
View package.json
{
"name": "my-app",
"version": "1.0.0",
"registries": {
"npm": { "url": "registry.npmjs.org", "default": true },
"tidelift": { "url": "registry.tidelift.org" },
"acme-corp": { "url": "verdaccio.acme.corp" }
},
"dependencies": {
"express": "^4.0.x",
View output.console
$ npm run test
> node-fetch@2.2.0 test /Users/emelia/Work/HighSnobiety/repos/node-fetch
> cross-env BABEL_ENV=test mocha --require babel-register test/test.js
node-fetch
✓ should return a promise
✓ should allow custom promise
@ThisIsMissEm
ThisIsMissEm / 1.js
Created Aug 21, 2018
Despite the code being identical other than the ordering of the "addEventListener" calls, the results change when run on the Cloudflare Worker platform.
View 1.js
addEventListener('fetch', event => {
console.log("fetch handler 2", event.request)
})
addEventListener('fetch', event => {
console.log("fetch handler 1")
event.respondWith(handleRequest(event.request))
})
/**
View keybase.md

Keybase proof

I hereby claim:

  • I am thisismissem on github.
  • I am thisismissem (https://keybase.io/thisismissem) on keybase.
  • I have a public key ASB-5tOXDkaDbWf5iEctuKAIBOnSfUzCu0bq1u0wsyHauwo

To claim this, I am signing this object:

View query.graphql
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.
# We'll get you started with a simple query showing your username!
query Test($owner: String!, $repo: String!, $baseRefName: String!, $cursor: String, $prCount: Int!) {
repository(owner: $owner, name: $repo) {
pullRequests(before: $cursor, last: $prCount, states: [MERGED], baseRefName: $baseRefName) {
totalCount,
pageInfo {
View gist:ab9382467d9fa02a46247dec536951b4
Your Gemfile lists the gem byebug (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
View Example ECS side-car containers.js
{
// The standard ECS options, place in your own values:
"cluster": "",
"serviceName": "my-side-car-container",
"taskDefinition": "",
"role": "",
// desireCount should be greater than the number of instances that are in the ECS cluster.
"desiredCount": 1000,
View Settings Authentication Watcher.js
import { put, takeEvery, call } from 'redux-saga/effects'
import backend from '@ada/lib/Backend'
import settings from '@ada/redux/modules2/settings'
export function* reloadSettings () {
const newSettings = yield call(backend.fetchAuth, 'user/settings')
yield put(settings.actions.replace(newSettings))
}
View TestApp.js
import React from 'react';
import {
registerComponent,
} from 'react-native-playground';
import {
StatusBar,
Text,
View,
AsyncStorage,
} from 'react-native';
View example.jsx
// views/Documents.js
function Documents(props) {
return (
<ul>
{props.documents.map((doc) => <li>{doc.id} - {doc.title}</li>)}
</ul>
)
}
You can’t perform that action at this time.