Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mtraynham's full-sized avatar

Matt Traynham mtraynham

View GitHub Profile
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n - 2)
def main():
num_Terms = 1000
fibSequence = []
for i in range(num_terms):
@mtraynham
mtraynham / PostgreSqlWithJsonDatabaseDialect.kt
Created March 12, 2022 00:16
Kafka Connect Postgres JSONB Dialect (Kafka 2.2.0)
package com.project.kafka.connect.jdbc.dialect
import com.project.kafka.connect.utils.JsonUtils
import io.confluent.connect.jdbc.dialect.DatabaseDialect
import io.confluent.connect.jdbc.dialect.DatabaseDialectProvider
import io.confluent.connect.jdbc.dialect.PostgreSqlDatabaseDialect
import io.confluent.connect.jdbc.sink.metadata.SinkRecordField
import java.sql.PreparedStatement
import org.apache.kafka.common.config.AbstractConfig
import org.apache.kafka.connect.data.Schema
@mtraynham
mtraynham / test.html
Last active September 19, 2015 17:19
Simple Webpage
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags here -->
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<!-- Page tags here -->
<title>Test</title>
<!-- 3rd party CSS here -->
@mtraynham
mtraynham / Gulpfile.js
Last active September 13, 2015 15:13 — forked from 0x1ad2/Gulpfile.js
My gulpfile example for How to enhance your front-end development workflow using Gulp
/*
* 0x1ad2 base Gulp.js file
* https://twitter.com/0x1ad2
*/
/*
* Define plugins
*/
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
@mtraynham
mtraynham / mixin.less
Last active August 29, 2015 14:25
Angular UI Grid Flat (Material-ish) styling
.transition (@props: all;
@duration:1s;
@delay: 0s;
@timing: ease;
@compact: true;
@raw-input: false) {
.output() when (@raw-input = false) and not (@compact = true) {
-webkit-transition-property:@props;
-moz-transition-property:@props;
-ms-transition-property:@props;
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE