Skip to content

Instantly share code, notes, and snippets.

View chrisfesler's full-sized avatar

Chris Fesler chrisfesler

  • Nutshell Labs
  • Portland, OR
  • 21:28 (UTC -08:00)
View GitHub Profile
# Set variables
$zipUrl = "https://digitalcorpora.s3.amazonaws.com/corpora/files/govdocs1/zipfiles/000.zip"
$zipFile = ".\000.zip"
$unzipPath = ".\unzipped"
# Measure download time
$downloadTime = Measure-Command {
Invoke-WebRequest -Uri $zipUrl -OutFile $zipFile
}
@chrisfesler
chrisfesler / Demo.java
Created April 20, 2013 00:42
strange behavior from esper when invoking methods on an Object variable while using a context
package com.apexclearing.esperdemo;
import com.espertech.esper.client.*;
import java.util.*;
public class Demo {
private final static String[] demoStatements = new String[]{
" CREATE CONTEXT partcontext PARTITION BY part FROM msg"
,
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.plugins.BasePlugin
/**
* apply this plugin after doing all dependency and repo stuff. It will create two idea 'libraries' per subproject
* and add them to your .iml files
*
* Forked from https://gist.github.com/360092
*
@chrisfesler
chrisfesler / Unisgned.java
Created January 19, 2012 05:16
Vanilla unsigned ints
package org.fesler.vanilla;
import java.io.*;
public enum Unsigned {;
public static int add(int i, int j) {
return i + j;
}
public static int subtract(int i, int j) {