Skip to content

Instantly share code, notes, and snippets.

Avatar

tim.rohrer tim-rohrer

  • United States
View GitHub Profile
View googleMapsStub.ts
window.google = {
maps: {
DirectionsService: class {
route() {}
},
DirectionsStatus: {
INVALID_REQUEST: 'INVALID_REQUEST' as google.maps.DirectionsStatus.INVALID_REQUEST,
MAX_WAYPOINTS_EXCEEDED: 'MAX_WAYPOINTS_EXCEEDED' as google.maps.DirectionsStatus.MAX_WAYPOINTS_EXCEEDED,
NOT_FOUND: 'NOT_FOUND' as google.maps.DirectionsStatus.NOT_FOUND,
OK: 'OK' as google.maps.DirectionsStatus.OK,
View parsePDFStatement.ts
parsePDFStatement = async () => {
try {
const pdfPath = this.setPDFPath();
const loadingTask = this.pdf.getDocument(pdfPath);
await loadingTask.promise
.then((doc) => {
const { numPages } = doc;
console.log("# Document Loaded");
console.log(`Number of Pages: ${numPages}`);
console.log();
@tim-rohrer
tim-rohrer / App.ts
Created Jun 16, 2020
My express app
View App.ts
import express from 'express';
import FetchGoogleRoutes, { FetchRoutesParams } from './FetchGoogleRoutes';
import { Client } from '@googlemaps/google-maps-services-js';
class App {
public express: express.Application;
public fetch: FetchGoogleRoutes;
constructor() {
View directionsResult.ts
import { DirectionsResponse } from "@googlemaps/google-maps-services-js"
export const foo: DirectionsResponse = { status: 200,
statusText: 'OK',
headers:
{ 'content-type': 'application/json; charset=UTF-8',
date: 'Fri, 05 Jun 2020 22:25:12 GMT',
pragma: 'no-cache',
expires: 'Fri, 01 Jan 1990 00:00:00 GMT',
'cache-control': 'no-cache, must-revalidate',
View reducer.ts
import { AppThunk } from "../configureStore"
import { RootState } from "./reducer"
// appStatus.js
const GOOGLE = "google"
const MAPBOX = "mapbox"
// App Status Actions
export const APP_IS_LOADED = 'mapping/app/isLoaded'
export const APP_IS_THINKING = 'mapping/app/appIsThinking'
@tim-rohrer
tim-rohrer / hdiutil_output
Created Dec 18, 2014
plist output from hdiutil trying to attach an image
View hdiutil_output
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>system-entities</key>
<array>
<dict>
<key>dev-entry</key>
<string>/dev/disk3</string>
<key>mount-point</key>
You can’t perform that action at this time.