Skip to content

Instantly share code, notes, and snippets.

@Willmo36
Willmo36 / d3-tip-browserify.js
Created March 30, 2015 10:14
d3-tip with browserify and webpack
let d3 = require("d3");
let d3tip = require("d3-tip");
d3tip(d3);
@pcan
pcan / SelfExpiringHashMap.java
Last active July 4, 2024 23:51
SelfExpiringHashMap - a Java Map which entries expire automatically after a given time; it uses a DelayQueue internally.
/*
* Copyright (c) 2019 Pierantonio Cangianiello
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
@ravishchawla
ravishchawla / SimpleDB Setup Instructions.md
Last active December 24, 2019 21:01
Setup instructions for installing and configuring the SimpleDB Server and Client Database
@mattwhetton
mattwhetton / HttpsRedirectMiddleware.cs
Last active November 24, 2020 23:22
Simple OWIN middleware for doing an HTTPs redirect for all requests
// Ref: http://www.codenutz.com/https-redirect-asp-net-core-using-owin-middleware/
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
namespace SomeNamespace
{
public class HttpsRedirectMiddleware {