Skip to content

Instantly share code, notes, and snippets.

@mochadwi
mochadwi / README.md
Created November 21, 2019 11:14
Setup and Install JDK 8, 9, 10 in macOS with Homebrew

Oracle now force user to signup and accept the license agreement in the oracle website.

JDK 8 is still mostly used among java developer especially Android Developer.

Unfortunately, if we're on macOS there's a bad news that the homebrew community delete the entire JAVA/JDk cask and give replacement support to use AdoptOpenJDK.

brew tap adoptopenjdk/openjdk

brew cask install adoptopenjdk8
@pjrt
pjrt / S3Puller.scala
Created May 14, 2015 19:15
S3 List Status ad-infinitude
import com.amazonaws.services.s3._, model._
import com.amazonaws.auth.BasicAWSCredentials
val request = new ListObjectsRequest()
request.setBucketName(bucket)
request.setPrefix(prefix)
request.setMaxKeys(pageLength)
def s3 = new AmazonS3Client(new BasicAWSCredentials(key, secret))
val objs = s3.listObjects(request) // Note that this method returns truncated data if longer than the "pageLength" above. You might need to deal with that.
@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`