This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* <[email protected]> wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return. D. Weymouth 4/2014 | |
* ---------------------------------------------------------------------------- | |
*/ | |
import java.io.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Downloading Oracle JVM without browser | |
Oracle requires you to accept its licence agreement before downloading its JVM. | |
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave... | |
I used Firefox and Firebug to sniff network exchanges. | |
## HTTP Request : | |
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NonContextualInjector<T> { | |
// Store the injection target. The CDI spec doesn't require an implementation to cache it, so we do | |
private final InjectionTarget<T> injectionTarget; | |
// Store a reference to the CDI BeanManager | |
private final BeanManager beanManager; | |
/** | |
* Create an injector for the given class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uncomment line if you want the instance to be retained in application scope | |
// @ApplicationScoped | |
public class ApplicationInitializer | |
{ | |
public void onStartup(@Observes @Initialized ServletContext ctx) | |
{ | |
System.out.println("Initialized web application at context path " + ctx.getContextPath()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Home-rolled Smush.it, by Alex Dunae (http://dialect.ca). | |
# | |
# N.B. This script works for me; it may not work for you. | |
# Since it overwrites your images with the optimized version, you should | |
# backup your files before running this script and do a trial run before | |
# getting too excited. This is your disclaimer. | |
# | |
# Uses jpegtran (http://jpegclub.org/jpegtran/), part of libjpeg, |