Skip to content

Instantly share code, notes, and snippets.

@aj0strow
aj0strow / account_status.csv
Last active October 26, 2023 04:14
Metro2 Format for Canadian Reporting
Status Description Equifax Description Equifax Rate
DA Delete entire account None 9
DF Delete entire account None 9
ZA Financial counseling Credit Counseling 7
05 Account transferred to another office Transferred or sold 1
07 Too new to rate None 0
11 Account in good standing None 1
13 Paid or closed account / zero balance Account paid 1
61 Account paid in full / was voluntary surrender Account paid 8
62 Account paid in full / was collection account / insurance claim or government claim Account paid 9
docker run -it --name tbears-container -p 9000:9000 -v $(pwd):/tbears iconloop/tbears
const axios = require("axios")
class HttpProvider {
constructor(url) {
this.url = url
this.id = 0
this.jsonrpc = '2.0'
}
// Call JSON RPC method. Get back { id, result } or { id, error }.
@aj0strow
aj0strow / DSToken.sol
Created October 1, 2018 22:19
EOS Token
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
package main
import (
"fmt"
)
type whyNeedPointer struct {
Do func(string)
}
@aj0strow
aj0strow / firebase.go
Created August 17, 2017 20:16
Firebase Custom Tokens
package firebase
import (
"github.com/knq/jwt"
"github.com/knq/jwt/gserviceaccount"
"time"
)
// Firebase JWT Claims
type Claims struct {
@aj0strow
aj0strow / bin-component.js
Created July 15, 2016 16:26
Scaffold a new react component
#!/usr/bin/env node
const fs = require("fs")
const path = require("path")
const _ = require("lodash")
// setup
const root = path.resolve(__dirname, "..")
const args = process.argv.slice(2)
@aj0strow
aj0strow / conditional-constraint.sql
Last active March 31, 2016 17:11
conditiona sql constraint
ADD CONSTRAINT with_old_syntax CHECK (status <> 'closed' OR agent_id IS NOT NULL);
ADD CONSTRAINT with_new_syntax CHECK (agent_id IS NOT NULL) WHERE (status = 'closed');
-- generically it would map as follows
CHECK (check_condition) WHERE (where_condition)
CHECK (NOT (where_condition) OR check_condition)
Private Function LinearInterpolate(ByVal x2 As Integer, ByVal y2 As Double,
ByVal x3 As Integer, ByVal y3 As Double) As Double
Try
LinearInterpolate = ((y2 - y3) / (x2 - x3)) * x2 + y2
Catch ex As Exception
SharedLogger.LogException(_moduleID & ":LI", ex) 'Log any exceptions.
LinearInterpolate = (y2 + y3) / 2
End Try
@aj0strow
aj0strow / component.css
Created December 24, 2015 16:21
Webpack local styles example
:local(.green) {
height: 20px;
background: green;
}