~/dev/bb[master] ★ heroku create
Creating shrouded-wave-4655... done, stack is cedar
http://shrouded-wave-4655.herokuapp.com/ | [email protected]:shrouded-wave-4655.git
Git remote heroku added
~/dev/bb[master] ★ git push heroku master
Counting objects: 25, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (25/25), 2.83 KiB, done.
This file contains 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
drop schema public cascade; | |
drop extension plv8; | |
create schema public; |
This file contains 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
irb(main):001:0> class Request; end | |
=> nil | |
irb(main):002:0> Request.class | |
=> Class | |
irb(main):003:0> Request.new.class | |
=> Request | |
irb(main):004:0> Request.new.class.to_s | |
=> "Request" |
This file contains 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
$ cd $ICEDTEA_PATH | |
$ find . -name NetworkInterface.c | |
./openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c | |
... | |
$ cp ./openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c ./NetworkInterface.c | |
$ vi NetworkInterface.c | |
/fscanf | |
note: fscanf should only match one line | |
replace first 02x with 08x | |
:wq |
This file contains 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
--- ./openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2013-03-04 21:51:01.000000000 +0000 | |
+++ ./openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2013-04-02 22:35:56.000000000 +0000 | |
@@ -1127,7 +1127,7 @@ | |
uint8_t ipv6addr[16]; | |
if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) { | |
- while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n", | |
+ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %08x %02x %02x %02x %20s\n", | |
addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7], | |
&if_idx, &plen, &scope, &dad_status, devname) != EOF) { |
This file contains 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
java -version 2>&1 | head -1 | sed "s/[^0-9\.\_\-]*//g" |
This file contains 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
// hack to get a Stream with a cursor-backed query because anorm doesn't combine the two | |
private def resultSetToStream(sql: SimpleSql[Row])(implicit c: Connection): Stream[SqlRow] = { | |
val stmt = sql.getFilledStatement(c, getGeneratedKeys = false) | |
stmt.setFetchSize(1000) | |
val rs = stmt.executeQuery() | |
val rsMetaData = Sql.metaData(rs) | |
val columns = List.range(1, rsMetaData.columnCount + 1) | |
def data(rs: java.sql.ResultSet) = columns.map(nb => rs.getObject(nb)) | |
Useful.unfold(rs)(rs => if (!rs.next()) { rs.getStatement.close(); None } else Some((new SqlRow(rsMetaData, data(rs)), rs))) | |
} |
This file contains 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
1 ls -lah | |
2 curl -O http://icedtea.wildebeest.org/download/source/icedtea-2.1.5.tar.gz | |
3 tar xvzf icedtea-2.1.5.tar.gz | |
4 cd icedtea-2.1.5 | |
5 ./configure --with-parallel-jobs=2 --disable-docs --disable-bootstrap --with-jdk-home=/usr/lib/jvm/java-6-openjdk | |
6 cd .. | |
7 curl -O http://mirror.olnevhost.net/pub/apache//ant/binaries/apache-ant-1.8.4-bin.tar.gz | |
8 tar xf apache-ant-1.8.4-bin.tar.gz | |
9 ls -lah | |
10 ls -lah apache-ant-1.8.4 |
This file contains 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
import java.security.Provider; | |
import java.security.Security; | |
public class SecurityListings { | |
public static void main(String[] args) { | |
for (Provider provider : Security.getProviders()) { | |
System.out.println("Provider: " + provider.getName()); | |
for (Provider.Service service : provider.getServices()) { | |
System.out.println(" Algorithm: " + service.getAlgorithm()); | |
} |
Heroku now offers beta support for OpenJDK 7, as well as an updated version of OpenJDK 6. Support for both JDKs are available in a new buildpack. OpenJDK 6 is still the default, but the version has been increased to u25 from u20 -- changes for u20-u25 can be found on Oracle's changelist blog. OpenJDK 7 can be enabled by configuring your pom.xml
. Currently, only maven builds are supported with this update.
This update has no impact on any running applications. If you choose not to use this buildpack, your applications will continue to use OpenJDK 6u20.