Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben McCann benmccann

View GitHub Profile
@benmccann
benmccann / RollupCompiler.ts
Created Aug 17, 2020
RollupCompiler debugging
View RollupCompiler.ts
import * as fs from 'fs';
import * as path from 'path';
import color from 'kleur';
import relative from 'require-relative';
import {
InputOption,
PluginContext,
TransformPluginContext,
TransformResult,
NormalizedInputOptions,
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>svelte-create</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@benmccann
benmccann / financial.html
Created Mar 2, 2019
Reproduces ticksLength issue
View financial.html
<!doctype html>
<html>
<head>
<title>Line Chart</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script src="../../../dist/Chart.js"></script>
<script src="../../utils.js"></script>
<style>
canvas {
View Tablesaw.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benmccann
benmccann / jstack1.txt
Created Jul 20, 2015
Play's Akka thread leak
View jstack1.txt
2015-07-19 18:41:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode):
"Attach Listener" #98 daemon prio=9 os_prio=0 tid=0x00007f51dc002000 nid=0x70a8 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"application-akka.actor.default-dispatcher-9" #97 prio=5 os_prio=0 tid=0x00007f51b0040800 nid=0x708b waiting on condition [0x00007f5188118000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000fcf742b0> (a akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinPool)
@benmccann
benmccann / StatementDetails.qif
Created Sep 6, 2013
Quickbooks File - Silicon Valley Bank Mastercard. SVB is an extremely popular bank among startups in the United States. Unfortunately, their .qif export functionality for their credit cards includes empty transactions with just the names of the cardholders and these extra entries cause .qif not to be able to be imported by Xero
View StatementDetails.qif
!Type:CCard
D08/30/2013
T-11.99
N55432867J0053NDPM
PAMAZON MKTPLACE PMTS AMZN.COM/BILLWA
^
D08/30/2013
T-11.95
N55432867J009RH41D
PAMAZON MKTPLACE PMTS AMZN.COM/BILLWA
@benmccann
benmccann / backup-openstack-wiki.patch
Last active Dec 14, 2015
patch to update the wiki for OpenStack Storage support
View backup-openstack-wiki.patch
diff --git a/Splitter.md b/Splitter.md
index 6e1ce90..d769e13 100644
--- a/Splitter.md
+++ b/Splitter.md
@@ -25,7 +25,7 @@ This can be disabled using the `--no-splitter` option with the [Generator](Gener
What does it do?
----------------
-It removes the file size constraints of remote storage locations such as Amazon S3, Rackspace Cloud Files, Ninefold and Dropbox. For example, you cannot store files larger than 5GB in size on Amazon S3. You can now configure backup with `split_into_chunks_of(5000)` to tell Backup to split the entire backup file in to chunks of 5000 megabytes (5gb) before storing it to Amazon S3. So assuming your backup is 15GB in size, it will split the backup file in 3 chunks and upload them separately.
+It removes the file size constraints of remote storage locations such as Amazon S3, OpenStack Storage, Rackspace Cloud Files, Ninefold and Dropbox. For example, you cannot store files larger than 5GB in size on Amazon S3. You can now configure backup with `split_into_chunks_of(5000)` to
@benmccann
benmccann / build.gradle
Created Apr 13, 2012
build.gradle for Google Guava
View build.gradle
apply plugin: 'java'
sourceSets {
main {
java { srcDir 'src' }
}
}
repositories {
mavenCentral()
@benmccann
benmccann / build.sbt
Created Apr 12, 2012
build.sbt for Google Guava
View build.sbt
name := "guava"
version := "12.0-SNAPSHOT"
scalaVersion := "2.9.1"
javaSource in Compile <<= baseDirectory(base => base / "src")
libraryDependencies += "com.google.code.findbugs" % "jsr305" % "1.3.9"
@benmccann
benmccann / LombokTest.java
Created Apr 10, 2012
Test demonstrating unexpected interaction between Lombok and Jackson
View LombokTest.java
package com.connectifier.data.search;
import java.io.IOException;
import java.util.List;
import junit.framework.Assert;
import lombok.Getter;
import org.junit.Test;