Skip to content

Instantly share code, notes, and snippets.

View 3gcodes's full-sized avatar

Gregg Bolinger 3gcodes

View GitHub Profile
private List<VehicleDescription> filterVehicleDescriptionsByIsInDMS(List<VehicleDescription> descriptions, String organizationId) {
try (var executor = ApplicationUtility.createExecutor()) {
if ((descriptions == null) || descriptions.isEmpty() || StringUtils.isBlank(organizationId)) {
return new ArrayList<>();
}
final var threadContext = SkAIThreadContext.export();
var vins = descriptions.stream() //
.filter(d -> d.getVinDescription() != null) //
.filter(d -> StringUtils.isNotBlank(d.getVinDescription().getVin())) //
describe('When valid Skill data is provided', () => {
test('Then do good things', async () => {
mockTransaction.mockResolvedValueOnce(true);
mockIsAuthenticated.mockResolvedValueOnce(true);
mockCareerPathGroupFindByPk.mockResolvedValueOnce({
id: 1,
});
mockEmployeeExistsByPk.mockResolvedValueOnce(true);
mockJobTypeExistsByPk
.mockResolvedValueOnce(true)
public sealed interface RegistrationApi {
@Post
HttpResponse<URI> registerUser(RegisterUserRequest request);
non-sealed interface RegistrationClient extends RegistrationApi {}
@Controller("/api/registration")
@Secured(SecurityRule.IS_ANONYMOUS)
final class RegistrationController implements RegistrationApi {
@Entity
public class Organization { }
@Entity
public class Person { }
@Entity
public class OrgPerson {
@ManyToOne
@JoinColumn(name = "org_id")
Center(
child: Column(
children: [
Expanded(
child: Container(
padding: EdgeInsets.all(20.0),
decoration: BoxDecoration(
color: Colors.blueGrey
),
child: Column(
@3gcodes
3gcodes / bill.js
Last active September 23, 2020 18:56
/*
add your bills to the bills array.
repeat: once | weekly | bi-weeky | monthly | bi-monthly
if using bi-monthly, you'll need a first and second argument
see examples below
*/
var bills = [
{"name": "Some Bill", "amount": -672, "next": new Date("2020-09-25"), repeat: "monthly"},
{"name": "Income", "amount": 2000.00, "next": new Date("2020-09-25"), repeat: "weekly"},
{"name": "Loan", "amount": -291.70, "next": new Date("2020-09-28"), repeat: "bi-monthly", first: 9, second: 28},
import React from 'react';
import styled from 'styled-components';
const WrapperRoot = styled.div`
max-width: 1024px;
margin: 0 auto;
> * {
border: 2px solid #f08c00;
padding: 10px;
<ResponsiveGrid>
<GridHeader>
<GridData flexBasis="20%">Date</GridData>
<GridData flexBasis="60%">Description</GridData>
<GridData flexBasis="20%">Amount</GridData>
</GridHeader>
{ data.map(row => {
return (
<GridRow>
<GridData flexBasis="20%">{row.date}</GridData>
const fs = require('fs');
const { Pool } = require('pg');
const neo4j = require('neo4j-driver');
const { v4: uuidv4 } = require('uuid');
const env = process.env.NODE_ENV || 'development';
const config = require('./config/config.json')[env];
const driver = neo4j.driver(config.neo4j, neo4j.auth.basic(config.username, config.password));
const pool = new Pool({
const axios = require('axios');
const cheerio = require('cheerio');
const url = 'https://boardgamegeek.com/collection/user/gdboling';
let ids = [];
let prices = [];
foo();
console.log(prices);