Skip to content

Instantly share code, notes, and snippets.

@alex-shpak
alex-shpak / querydsl.gradle
Last active January 9, 2020 05:45
Gradle script for querydsl-apt processor with separate classpath
// apply plugin: 'idea'
sourceSets {
generated.java
main.java.srcDirs += generated.java.srcDirs
}
configurations {
querydslapt
}
@mathiasbynens
mathiasbynens / url-code-points.js
Last active October 27, 2016 14:46
Let’s create a JavaScript-compatible regular expression that matches any URL code point, as per the URL Standard.
// “The URL code points are ASCII alphanumeric, "!", "$", "&", "'", "(", ")",
// "*", "+", ",", "-", ".", "/", ":", ";", "=", "?", "@", "_", "~", and code
// points in the ranges U+00A0 to U+D7FF, U+E000 to U+FDCF, U+FDF0 to U+FFEF,
// U+10000 to U+1FFFD, U+20000 to U+2FFFD, U+30000 to U+3FFFD, U+40000 to
// U+4FFFD, U+50000 to U+5FFFD, U+60000 to U+6FFFD, U+70000 to U+7FFFD, U+80000
// to U+8FFFD, U+90000 to U+9FFFD, U+A0000 to U+AFFFD, U+B0000 to U+BFFFD,
// U+C0000 to U+CFFFD, U+D0000 to U+DFFFD, U+E1000 to U+EFFFD, U+F0000 to
// U+FFFFD, U+100000 to U+10FFFD.”
// — http://url.spec.whatwg.org/#url-code-points