Skip to content

Instantly share code, notes, and snippets.

View tyndallm's full-sized avatar

Matt Tyndall tyndallm

View GitHub Profile
@tyndallm
tyndallm / DharmaSweeper.sol
Created December 13, 2018 16:35
Counterfactual Sweeper contract for Dharma
pragma solidity ^0.4.24;
/**
* Based on Austin Griffith's Counterfactual Sweeper contract
* https://github.com/austintgriffith/counterfactual-token-repayment/blob/master/contracts/Sweeper/Sweeper.sol
*
* Upon creation, this contract will make a repayment on behalf of a debtor
*
* agreementId - Dharma loan agreement ID
* repaymentRouter - Address of Dharma's RepaymentRouter contract
@tyndallm
tyndallm / PolicyContract.sol
Created September 11, 2018 15:48
PolicyContract interface
pragma solidity ^0.4.18;
interface PolicyContract {
/// Activate a policy
function registerPolicyStart(
bytes32 policyId,
address insured
) public returns (bool _success);
/// Record all premium payments
0xDB14c5e06D8974dA7A9cDeA2823B5455506697EB
0x77F714DC9E889016216069Bc7a5Ebba729E2c19a
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_parent_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true">
<android.support.v7.widget.Toolbar
@tyndallm
tyndallm / Tyndall GTKY
Created December 1, 2013 21:46
This code snippet contains functions for retrieving check-in data from Facebook's SDK as well as expiring old data.
private void updateExpiredHits(){
Query<VenueDto> venueQuery = datastore.find(VenueDto.class);
Venues venues = new Venues();
for(VenueDto venueDto: venueQuery){
venues.add(venueDto);
}
Query<HitDto> hitQuery = datastore.find(HitDto.class, "expired", false);
Hits activeHits = new Hits();