Instantly share code, notes, and snippets.


Hacker News actually made my life better:

Test procedure that doesn't require 3rd-party libs:

  • For Python 2:
$ python -c "import json, urllib2; print json.load(urllib2.urlopen(''))['tls_version']"
View salat-release.text
++ 2.11.8 publishSigned
++ 2.11.8 sonatypeRelease
++ 2.10.6 publishSigned
++ 2.10.6 sonatypeRelease
++ 2.12.2 publishSigned
++ 2.12.2 sonatypeRelease

Keybase proof

I hereby claim:

  • I am noahlz on github.
  • I am noahlz ( on keybase.
  • I have a public key ASBYapMXW39QysqyLFXcYNWfTOzLutqRlw06F9KM2tKBDwo

To claim this, I am signing this object:


I figured out why you might be having issues upgraded the operating system. I spoke to our engineers, and unfortunately, with our Dell image there are proprietary drivers and repositories. This will cause an issue and prevent you from upgrading to 15.04/15.10.

If you want to see how the system will operate in 15.10 without installing it first, you can run the ‘live cd’ on the system and see how it works with the touch pad. That way you can decide whether or not you would like to upgrade.

Here is the link for the download:

In order to use this, you will need to boot from a flash drive.

  1. Power on the system and press F12
View hello.rb
## Simple extension of the Chef tutorial for appending line(s) to the end of a cookbook
## Alternative to copying an entire cookbook just to add one line to a config file.
## (Apparently, partials are an alternative in Chef 11?
file 'motd' do
content "hello chef\n"
ruby_block "ensure sig to end of file" do
View warning.scala
scala> val x = 1 :: 2 :: 3 :: Nil
x: List[Int] = List(1, 2, 3)
scala> val y = 1 :: 2 :: 4 :: Nil
y: List[Int] = List(1, 2, 4)
scala> x union y
res1: List[Int] = List(1, 2, 3, 1, 2, 4)
scala> res1.distinct
View SalatSandbox.scala
package noahlz
import com.novus.salat._
import com.novus.salat.grater
import scala.util.control.NonFatal
case class Data(name: String, datums: Vector[Double])
case class MaybeData(name: String, datums: Vector[Option[Double]])
case class Datum(d: Option[Double])

Troubleshooting Production JVMs with jcmd

jcmd is a powerful new tool introduced in Java 7. Along with jstack and jps, it should be in your go-to tool for solving production problems on the JVM. (Come to think of it, with this tool you don't really need jps anymore)

Here's an example session with jcmd:

$ ssh
$ jcmd -l
34739 -l