Skip to content

Instantly share code, notes, and snippets.

View kdepp's full-sized avatar
🏠
Working from home

CuteRat kdepp

🏠
Working from home
View GitHub Profile
@kdepp
kdepp / dataset.json
Created August 16, 2023 08:38
Test dataset
[
{
"s_payee": "On Time Services LLC",
"e_payee": "Payee: On Time Services LLC",
"s_property": "109 Galveston Pl, SW (Strasbourger) - 109 Galveston Pl, SW Washington, DC 20032",
"e_client_address": "Address: 109 Galveston Pl, SW (Strasbourger) - 109 Galveston Pl, SW Washington, DC 20032",
"s_gl_account": "5739: HVAC Maintenance"
},
{
"s_payee": "Area probe LLC",
@kdepp
kdepp / index.ts
Created May 27, 2021 08:11
Group appfolio url
const fs = require("fs");
const url = require("url");
type UrlInfo = {
fullUrl: string;
hostname: string;
platform: string | undefined;
path: string;
count: number;
};
@kdepp
kdepp / curl.sh
Last active November 4, 2020 23:57
import transaction
# response: {“error”:“runtime error: Return of function system.maxtimeuuid : (timestamp) -\u003e timeuuid (789b3fff7e41f9117f7f7f7f7f7f7f7f) is not a valid value for its declared return type timeuuid”}
curl 'https://dev.app.proper.ai/ledgerlord/v1/orgs/201a6b6c-e347-11e9-aa53-acde48001122/appfolio/transaction/imports/' \
-H 'authority: dev.app.proper.ai' \
-H 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6ImQxOTI5ZmY0NWM2MDllYzRjNDhlYmVmMGZiMTM5MmMzOTEzMmQ5YTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vcHJvcGVyLWJhc2UiLCJhdWQiOiJwcm9wZXItYmFzZSIsImF1dGhfdGltZSI6MTYwMzI4NDY5MCwidXNlcl9pZCI6IjVoSFZiQXlTNnJoMjBBZ1RydVVLZFJRcXZ1MTMiLCJzdWIiOiI1aEhWYkF5UzZyaDIwQWdUcnVVS2RSUXF2dTEzIiwiaWF0IjoxNjA0NTMzNzU4LCJleHAiOjE2MDQ1MzczNTgsImVtYWlsIjoibWF0dGllQHByb3Blci5haSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJtYXR0aWVAcHJvcGVyLmFpIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifX0.E963rZvpSS7Xo5O2uyaf437pCUht5Os3D7DG3ZyXCETtW4oFxzYKMlSCsVjkuLM89G07ht
@kdepp
kdepp / AudioHardware.h
Created November 19, 2019 04:48
Core Audio Header Files
/*==================================================================================================
File: CoreAudio/AudioHardware.h
Contains: API for communicating with audio hardware.
Copyright: (c) 1985-2011 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
@kdepp
kdepp / index.js
Created August 4, 2019 08:37
Apply styles from vue files in shadow DOM
// Set shadowRoot in root Vue options
new Vue({
el: $root,
shadowRoot: yourShadowRoot,
components: { App },
render: (h: any) => h('App')
} as any)
@kdepp
kdepp / webpack.config.js
Created August 4, 2019 06:17
Avoid applying two modules to one resource
config = {
module: {
rules: [
{
test: /\/raw\/.*\.scss$/,
use: ['raw-loader', 'css-loader', 'postcss-loader', 'sass-loader']
},
{
test: (name) => /\.scss$/.test(name) && !/\/raw\//.test(name),
use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader']
export function request (url, params = {}) {
return fetch(url, params)
.then(res => res && res.json())
}
export function withTimeout (timeout, fn, context) {
return (...args) => {
return new Promise((resolve, reject) => {
setTimeout(() => reject(new Error('Function timeout')), timeout)
@kdepp
kdepp / b.js
Last active January 31, 2018 02:53
withAccessToken
const getAccessToken = () => {
const pGetToken = db ? getAccessTokenFromDB() : Promise.resolve()
return pGetToken.then(token => {
if (token) return token
return getAccessTokenFromRemote()
.then(data => {
if (!data || !data.access_token) {
throw new Error('No access token in token api response')
// Old
const result = await rp(options)
if (!result.ok) {
console.error("The request was not ok: " + JSON.stringify(result));
return response.header("Location", `https://us-central1-teamsync-working-v2.firebaseapp.com`).send(302);
}
await admin.database().ref("installations").child(result.team_id).set({
token: result.access_token,
team: result.team_id,
@kdepp
kdepp / install_eslint.sh
Created June 29, 2017 03:07
npm install eslint relavent bundle
#!/bin/sh
npm install --save-dev babel-eslint eslint eslint-config-standard eslint-plugin-html eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard