Skip to content

Instantly share code, notes, and snippets.

@rrmistry
rrmistry / CustomSchemaFactoryWrapper.java
Created May 21, 2019 21:16
StackOverflow Q 56174997 - Json Schema Generator with inheritance and references
/*
MIT License
Copyright (c) 2019 Rohit Mistry
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
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 6, 2024 20:05
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@XiaoxiaoLi
XiaoxiaoLi / ColorUtils.java
Last active March 22, 2024 14:47
Java Code to get a color name from rgb/hex value/awt color. The part of looking up a color name from the rgb values is edited from * https://gist.github.com/nightlark/6482130 by Ryan Mast (nightlark)
import java.awt.Color;
import java.util.ArrayList;
/**
* Java Code to get a color name from rgb/hex value/awt color
*
* The part of looking up a color name from the rgb values is edited from
* https://gist.github.com/nightlark/6482130#file-gistfile1-java (that has some errors) by Ryan Mast (nightlark)
*
* @author Xiaoxiao Li
@zcourts
zcourts / pom.xml
Created November 28, 2012 22:09
generic Scala RPM pom.xml file
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>project</artifactId>
<groupId>com.company</groupId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Project</name>