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
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/example_db | |
at java.sql.DriverManager.getConnection(DriverManager.java:689) | |
at java.sql.DriverManager.getConnection(DriverManager.java:247) | |
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75) | |
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) | |
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148) | |
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) | |
at scalikejdbc.CommonsConnectionPool.borrow(CommonsConnectionPool.scala:43) | |
at scalikejdbc.NamedDB.db$lzycompute(NamedDB.scala:33) | |
at scalikejdbc.NamedDB.db(NamedDB.scala:31) |
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
val drivers = java.sql.DriverManager.getDrivers | |
while (drivers.hasMoreElements) { | |
val driverClass = drivers.nextElement().getClass | |
println(s"${driverClass.getName} loaded with ${driverClass.getClassLoader}") | |
} |
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
def CLdump(cl: ClassLoader = Thread.currentThread().getContextClassLoader) = { | |
val f = classOf[ClassLoader].getDeclaredField("classes") | |
f.setAccessible(true) | |
dump(cl) | |
def dump(cl: ClassLoader): Unit = { | |
if (cl == null) return | |
val classes = f.get(cl).asInstanceOf[java.util.Vector[java.lang.Class[_]]] | |
println(cl) | |
println(classes.toArray.map(cl => "\t" + cl.toString).mkString("\n")) | |
dump(cl.getParent) |
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
sun.misc.Launcher$AppClassLoader@55f96302 | |
interface org.apache.hadoop.fs.Seekable | |
interface org.apache.hadoop.fs.PositionedReadable | |
interface org.apache.hadoop.fs.ByteBufferReadable | |
interface org.apache.hadoop.fs.HasFileDescriptor | |
... |
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
#!/usr/bin/env bash | |
boot2docker stop | |
boot2docker delete | |
boot2docker init | |
boot2docker start |
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
# Update the branches | |
git fetch | |
# Rebase from master to the branch to be update | |
git rebase -i origin/master | |
# Show commits tree in gitk | |
gitk --all | |
# Push to the upstream branch |
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
{"_id":{$regex : "AbTestAndGroupId_IMAGE_SOURCE_ANDROID_ALL*"}} |
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/sh | |
if [ -z "$1" ]; then echo "Please add build number"; exit; fi | |
rm confirmedBuild | |
touch confirmedBuild | |
echo $1 > confirmedBuild | |
# /usr/bin/s3cmd is where the s3 command tool locates | |
/usr/bin/s3cmd put confirmedBuild s3://<bucket name>/ |
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
# save under /etc/profile.d/git-env.sh | |
export PATH=$PATH:/opt/git/bin |
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
su - | |
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
yum install gcc perl-ExtUtils-MakeMaker | |
yum remove git | |
# Download source | |
# check latest version in http://git-scm.com/downloads | |
cd /usr/src |