Skip to content

Instantly share code, notes, and snippets.

Joey jfrazee

  • Austin, TX
Block or report user

Report or block jfrazee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jfrazee
jfrazee / LookupAttribute_CSV_Example.xml
Last active Apr 16, 2017
LookupAttribute CSV Example
View LookupAttribute_CSV_Example.xml
<?xml version="1.0" ?>
<template encoding-version="1.0">
<description></description>
<groupId>1cd46966-0159-1000-3bc2-e181b17f75f5</groupId>
<name>LookupAttribute CSV Example</name>
<snippet>
<processGroups>
<id>77fa6bb7-015b-1000-0000-000000000000</id>
<parentGroupId>1cd46966-0159-1000-0000-000000000000</parentGroupId>
<position>
@jfrazee
jfrazee / NIFI-3585.xml
Created Mar 21, 2017
NIFI-3585: Add DatabaseAdapter impl for MS SQL 2008
View NIFI-3585.xml
<?xml version="1.0" ?>
<template encoding-version="1.0">
<description>Add DatabaseAdapter impl for MS SQL 2008</description>
<groupId>f23b8db4-015a-1000-3c3d-2f6bbd6e7aed</groupId>
<name>NIFI-3585</name>
<snippet>
<processGroups>
<id>f23c8dca-015a-1000-0000-000000000000</id>
<parentGroupId>f23b8db4-015a-1000-0000-000000000000</parentGroupId>
<position>
@jfrazee
jfrazee / NIFI-3147-suggestions.diff
Created Mar 7, 2017
NIFI-3147-suggestions.diff
View NIFI-3147-suggestions.diff
diff --git a/nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/pom.xml b/nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/pom.xml
index 7bb3112b9..41ddb5c05 100644
--- a/nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/pom.xml
+++ b/nifi-nar-bundles/nifi-ccda-bundle/nifi-ccda-nar/pom.xml
@@ -33,7 +33,6 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ccda-processors</artifactId>
- <version>1.2.0-SNAPSHOT</version>
</dependency>
@jfrazee
jfrazee / README.md
Last active Jul 28, 2016
NIFI-2142 Cache compiled XSLT in TransformXml
View README.md

NIFI-2142 Cache compiled XSLT in TransformXml

Basic Usage

Note the stark contrast between TransformXml running with and without caching:

@jfrazee
jfrazee / FilterBadGzipFiles.scala
Last active Sep 5, 2019
Spark job to read gzip files, ignoring corrupted files
View FilterBadGzipFiles.scala
import java.io._
import scala.io._
import java.util.zip._
// Spark
import org.slf4j.Logger
import org.apache.spark.{ SparkConf, SparkContext, Logging }
// Hadoop
import org.apache.hadoop.io.compress.GzipCodec
@jfrazee
jfrazee / tuple_to_args.scala
Created Aug 19, 2013
Convert tuples to scala arguments
View tuple_to_args.scala
// Just an ordinary function
def sum(x: Int, y: Int, z: Int) = x + y + z
// A tuple of arguments
val args = (1, 2, 3)
// Convert the function to a (partial) Function, which has a tupled method
// that takes tuples up to arity 5
(sum _).tupled(args)
View em-twitter-connection.diff
--- a/lib/em-twitter/connection.rb
+++ b/lib/em-twitter/connection.rb
@@ -137,7 +137,7 @@ module EventMachine
protected
def handle_stream(data)
- @last_response << @decoder.decode(data)
+ @last_response << (@decoder ||= BaseDecoder.new).decode(data)
if @last_response.complete?
@jfrazee
jfrazee / citecut.rb
Created Jul 5, 2012
Cut unused entries from .bib files
View citecut.rb
require 'set'
require 'bibtex'
# Usage: ruby citecut.rb <latex> <bib>
# Get the citekeys used in the LaTeX doc
citekeys = Set.new
open(ARGV[0]).readlines.each do |line|
line.scan(/\\\w*cite\w*{([\w\d,:-]+)}/) do |c|
citekeys.merge c[0].split(',')
@jfrazee
jfrazee / twitter_filter.js
Created Jan 10, 2012
Twitter Streaming API with Node.js Request module
View twitter_filter.js
var request = require('request');
function filter(options, callback){
var params = {
uri: "https://stream.twitter.com/1/statuses/filter.json",
}
if (typeof options['oauth'] !== 'undefined'){
params.oauth = options.oauth;
delete options.oauth;
}
You can’t perform that action at this time.