Skip to content

Instantly share code, notes, and snippets.

View thomasdarimont's full-sized avatar
🏠
Working from home

Thomas Darimont thomasdarimont

🏠
Working from home
View GitHub Profile
@thomasdarimont
thomasdarimont / postgres_to_kafka.sh
Created July 20, 2018 22:34 — forked from tilakpatidar/postgres_to_kafka.sh
Postgres to Kafka streaming using debezium
# Run postgres instance
docker run --name postgres -p 5000:5432 debezium/postgres
# Run zookeeper instance
docker run -it --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper
# Run kafka instance
docker run -it --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium/kafka
# Run kafka connect
@thomasdarimont
thomasdarimont / create-react-ts-mobx-app.sh
Created June 26, 2018 07:35 — forked from docwalter/create-react-ts-mobx-app.sh
create-react-app + TypeScript + MobX
#!/bin/env sh
set -e
if [ -z "$1" ] ; then
echo "Usage: `basename $0` appname"
exit 1
fi
name="$1"
@thomasdarimont
thomasdarimont / find-changed-files-in-git.sh
Created August 31, 2016 16:00 — forked from gernotstarke/find-changed-files-in-git.sh
find heavily changed files in git repository
git log --since="90 days ago" --pretty=format:"" --name-only | \
grep "[^\s]" | \
sort | uniq -c | \
sort -nr | head -10
#!/usr/bin/env zsh
# in fino veritas
# Borrowing shamelessly from these oh-my-zsh themes:
# fino-time
# pure
# https://gist.github.com/smileart/3750104
# Set required options
@thomasdarimont
thomasdarimont / git sync
Created February 28, 2016 19:33 — forked from miguelgonz/git sync
git sync
#!/bin/sh
#To make use of this just copy it to your path, +x it, and do git sync
MAIN_BRANCH="develop"
CURRENT_CHANGES=`git status --porcelain`
CURRENT_BRANCH=`git symbolic-ref -q --short HEAD`
if [ "$CURRENT_CHANGES" != "" ]; then
git stash --include-untracked
fi
@thomasdarimont
thomasdarimont / softwareengineeringexcel.md
Last active January 3, 2023 23:00 — forked from arttuladhar/softwareengineeringexcel.md
Software Engineering Competency Checklist

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array

This assumes that you already have the Shibboleth IdP installed. If you haven't done that yet you can read how to set it up at Install CAF FedSSO (Shibboleth) w/ idp-caf-installer

Tasks

Allow the following attributes to be released from our Identity Provider (IdP) to a Service Provider (SP). In this case I'll be giving access to testshib.org and CAF (eduroam). Since I don't have an SP I use testshib.org so I can see what gets processed on the SP side.

  • eduPersonTargetedID: unique id autogenerated by Shibboleth
  • eduPersonPrincipalName: if you’re using the CAF installer, this will be built from the “sAMAccountName” field in AD with @domain.ca on the end (for example, “user@domain.ca”)
  • mail: email address, comes from “mail” field in AD (example: user@example.com)
@thomasdarimont
thomasdarimont / pr.md
Last active August 29, 2015 14:23 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@thomasdarimont
thomasdarimont / gist:d418742a3703108365db
Created April 1, 2015 08:19 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures (github.com)
  1. General Background and Overview
public class MysteryBox {
private long x0, x1;
private boolean y0, y1, y2, y3;
private int z0;
private double[] a = new double[8];
}