Skip to content

Instantly share code, notes, and snippets.

View CraicOverflow89's full-sized avatar

Jamie Purchase CraicOverflow89

  • Lincoln, England
View GitHub Profile
@CraicOverflow89
CraicOverflow89 / CSSMinifier.kt
Created December 19, 2019 08:43
Example of using POST request to cssminifier.com to minify a css file.
import java.io.File
import java.io.InputStreamReader
import java.io.OutputStreamWriter
import java.net.HttpURLConnection
import java.net.URL
import java.net.URLEncoder
fun main() {
// Input File
@CraicOverflow89
CraicOverflow89 / JavaScriptMinifier.kt
Last active December 19, 2019 08:41
Example of using POST request to javascript-minifier.com to minify a javascript file.
import java.io.File
import java.io.InputStreamReader
import java.io.OutputStreamWriter
import java.net.HttpURLConnection
import java.net.URL
import java.net.URLEncoder
fun main() {
// Input File
fun main(args: Array<String>)
{
// Fetch Input
val input = input()
// Iterate Chars
var total = 0
var n = 0
do
{
fun main(args: Array<String>)
{
// Fetch Input
val input = input()
// Iterate Chars
var total = 0
var n = 0
while(++ n < input.length)
{
@CraicOverflow89
CraicOverflow89 / Lucee5_PseudoConstructor_Bug
Last active November 15, 2017 12:24
Potential Bug in Lucee 5
view the metadata with SOME_VAR expression included (i'm not seeing the @hint, @param or @return values for the first method)
then remove the SOME_VAR line altogether and run it again (then i am seeing the annotations correctly)
/* THIS IS OUR CLASS
"testClass.cfc"
*/
component output = false
{
SOME_VAR = "some value"