Skip to content

Instantly share code, notes, and snippets.

View richardgill's full-sized avatar

Richard Gill richardgill

View GitHub Profile
@richardgill
richardgill / microCovidFeedback.md
Last active September 13, 2020 20:42
Micro Covid

Hi Micro Covid team!

First of all - let me say that I think Micro Covid is amazing and your work is fantastic!

I helped build a similar tool https://shouldigooutnow.com/, which is a little bit simpler than Micro Covid. We built it over the last couple of weeks without any knowledge that Micro Covid existed. So, reading your whitepaper and looking at the code has been really interesting. You might find it interesting to read about our methodology - we've done a few things differently.

Our code is open source, here is our core risk model, we've tried to keep it as short and clear as possible.

// Immediately-invoked function expression
"use strict";
var duration = /(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;
/**
* conversion ratios
*/
@richardgill
richardgill / bashrc.sh
Created January 1, 2019 18:12
Rich's Bash Profile Tips
export PS1="\[\e[30;1m\w\[\e[0m\]\$(git-radar --bash --fetch)\n$ "
alias githubdiff='open "https://github.$(git config remote.origin.url | cut -f2 -d.)/compare/$(git rev-parse --abbrev-ref HEAD)?expand=1"'
alias bitbucketdiff='open "$(git config remote.origin.url)/pull-requests/new#diff"'
@richardgill
richardgill / shouldIPutItInRedux.md
Created December 7, 2017 11:41
Should I put it in Redux?

Should I put it in Redux?

Probably.

Exceptions

1. You want to reuse a component. Put it in multiple projects / put it in NPM.

You don't really want to force other people projects to use redux / setup loads of redux stuff in this case.

Provisioning profiles have a certificate.

When using fastlane match development or fastlane match appstore you might want to pass comma seperated app identifiers (bundle ids) into the command. This will generate N provisioning profiles attached to one certificate for each command you run.

There is a limit per itunes connect account on the number of certificates. (We think the limit is for the same certificate type with the same name).

@richardgill
richardgill / tinkering.md
Last active September 12, 2017 12:55
ZDEV Tinkerers

ZDEV Tinkerers

Rich

  • Used a firewall program (ZoneAlarm Pro) to 'Bridge' on Halo 2. So that my friends and I could pwn people playing in the US (who always got host otherwise)
  • Fixed ALOT of computers, built computers, installed operating systems from scratch.
  • Once broke my parent's 486 (which cost a lot of money!) so that it would only boot up into DOS and start a game - My Dad was not impressed.

John

@richardgill
richardgill / example.md
Created August 25, 2017 10:29
Event propogation example
<div id=1 onClick=(e) => {
  console.log(1)
}>
  <div id=2 onClick=(e) => {
    console.log(2)
  }>
   2
  </div>
 1

Search for regex: ^(#+)([a-zA-Z]|\d)

Replace with: $1 $2

@richardgill
richardgill / forcingRNAppUpgrades.js
Created March 16, 2017 14:42
Forcing React Native App Upgrades
import { Alert, Linking } from 'react-native'
import DeviceInfo from 'react-native-device-info'
import config from 'expresso-common/config'
import { platformIsIos } from 'expresso-common/common/platform'
import Firebase from 'firebase'
import semanticVersion from 'semver'
const attemptAndroidUpgrade = (appId) => {
const playStoreUri = `market://details?id=${appId}`
const playStoreUrl = `https://play.google.com/store/apps/details?id=${appId}`
@richardgill
richardgill / forking.md
Last active March 15, 2017 10:13
How to Fork

Fork the main repo (button top right).

  • git clone <the fork repo>
  • git remote add upstream <the main repo>

git remote -v <- see the remotes you have now

Most work will be done against origin. e.g. git push origin my-branch

When you're ready to do a PR, do a PR from the fork repo to the main repo.