Skip to content

Instantly share code, notes, and snippets.

@timfong888
timfong888 / indexer-debugging.js
Created May 30, 2023 18:33
Trying to figure out why mnemonic isn't working as an ENV variable
1 "use strict";
2 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4 return new (P || (P = Promise))(function (resolve, reject) {
5 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8 step((generator = generator.apply(thisArg, _arguments || [])).next());
9 });
10 };
@timfong888
timfong888 / main.dart
Created July 22, 2022 02:49
main() listener with goRouter
import 'dart:async';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'auth/firebase_user_provider.dart';
import 'auth/auth_util.dart';
@timfong888
timfong888 / main.dart
Created July 20, 2022 20:25
Listener routing to named Route
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FFAppState(); // Initialize FFAppState
GetSocial.addOnInitializedListener(() => {
// GetSocial SDK is ready to use
});
@timfong888
timfong888 / amplitudeflutterCustomAction.dart
Created May 15, 2022 21:24
AmplitudeFlutterCustomAction
import 'package:amplitude_flutter/amplitude.dart';
import 'package:amplitude_flutter/amplitude_web.dart';
import 'package:amplitude_flutter/constants.dart';
import 'package:amplitude_flutter/identify.dart';
import 'package:amplitude_flutter/web/amplitude_js.dart';
Future amplitudeAction(
BuildContext context,
String userID,
String page,
@timfong888
timfong888 / MarkdownCustomWidget.dart
Last active May 15, 2022 20:19
Flutter Markdown Custom Widget Code in FF UI
import 'package:flutter_markdown/flutter_markdown.dart';
class MarkdownCustomWidget extends StatefulWidget {
const MarkdownCustomWidget({Key{NULL_SAFE_QUESTION_SENTINEL} key ,
this.width,
this.height,
this.markdownData, }) : super(key: key);
final double{NULL_SAFE_QUESTION_SENTINEL} width;
final double{NULL_SAFE_QUESTION_SENTINEL} height;
May 21, 2016

Reset everything

docker stop imply
docker rm imply
docker run -p 8081-8110:8081-8110 -p 8200:8200 -p 9095:9095 -d --name imply imply/imply:$implyversion
docker ps
➜ code sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
python-dev is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
python-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
require_relative "../iron.io/refactor_bot_response"
require_relative "../iron.io/survey_class"
# http://jakegoulding.com/presentations/rspec-structure/#slide-32
# https://railsadventures.wordpress.com/2013/09/25/11-steps-to-make-your-rspec-specs-awesome/
# https://semaphoreci.com/community/tutorials/rspec-subject-helpers-hooks-and-exception-handling
RSpec.describe Survey do
describe "#new for a repeating survey for bot_client_id = x" do

Allyforce Sample Model

This shows the complex relationships

Initial Data Model

  • Alliance Manager (am)

  • Sales Rep (rep)

  • Sales Organization (org)

  • Accounts (accounts)

@timfong888
timfong888 / text.txt
Created October 10, 2011 18:45
Response from target
The Problem
The number of donor organs available far exceeds the number of patients requiring a kidney (7800 patients waiting for an organ with just 2695 transplants taking place in the UK 2010/11). Therefore it is essential to utilise donor organs wisely. The best match between donor and recipient depends upon genetic similarity (tissue-type) and antibody status (which antibodies have been found to other peoples tissue-types)
Patients may have antibodies which will preclude them from even being considered for a kidney.
The problem we have at present is that not all antibodies defined seem to correlate with poor outcome. In other words, the tests we use to identify antibodies are far too sensitive but we have to be cautious and include them on a patient’s record. Furthermore antibody detection can vary for the same sample depending on which laboratory tests them.
Thus by comparing actual transplant successes and failures with the data produced by the tests, we are able to better correlate which antibody and