Skip to content

Instantly share code, notes, and snippets.

public class FileDemo {
public static void main(String[] args) {
File f = null;
// creates temporary file
$ echo "hello"
$ cd ~
$ pwd
> cd warbler
> ls
Gemfile LICENSE.txt Rakefile integration pom.xml warble.rb warbler.ipr
Gemfile.lock Mavenfile bin lib spec warbler.gemspec warbler.iws
jkutner /
Last active August 29, 2015 14:01
Feynman's Appendix to the Rogers Commission Report on the Space Shuttle Challenger Accident

The software is checked very carefully in a bottom-up fashion. First, each new line of code is checked, then sections of code or modules with special functions are verified. The scope is increased step by step until the new changes are incorporated into a complete system and checked. This complete output is considered the final product, newly released. But completely independently there is an independent verification group, that takes an adversary attitude to the software development group, and tests and verifies the software as if it were a customer of the delivered product. There is additional verification in using the new programs in simulators, etc. A discovery of an error during verification testing is considered very serious, and its origin studied very carefully to avoid such mistakes in the future. Such unexpected errors have been found only about six times in all the programming and program changing (for new or altered payloads) that has been done. The principle that is followed is that all the verif

View example.rb
require 'java'
class Example
java_annotation 'Deprecated'
java_field "public java.lang.String abc"
def test0 = "quack"
jkutner / foo.rb
Last active August 29, 2015 14:03
View foo.rb
class Foo
def self.my_attr(name, type, annotations=[])
annotations.each do |a|
java_field "public #{type} #{name}"
my_attr :firstname, "String", ["Required"]
installing travis-1.7.0.gem
ERROR: Loading command: install (LoadError)
load error: jopenssl/load -- java.lang.VerifyError: Bad type on operand stack
Exception Details:
org/jruby/ext/openssl/X509Cert.sign(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; @140: invokevirtual
Type 'org/bouncycastle/asn1/ASN1ObjectIdentifier' (current frame, stack[1]) is not assignable to 'org/bouncycastle/asn1/DERObjectIdentifier'
Current Frame:
bci: @140
jkutner / gist:8457ecf8479d9f5f8472
Last active August 29, 2015 14:08
Javascript and Ebola
View gist:8457ecf8479d9f5f8472

There was a time when Javascript was confined to the browser, much like Ebola was confined to a laboratory. The lab, like the browser, was a dangerous place. One could only enter after donning protective gear in the same way one must use JQuery. But those days are gone.

Ebola has escaped the lab. It's infected thousands of people in West Africa and literally billions of people in the United States. Likewise, Javascript has escaped the browser and runs on our servers and threatens our children.

It's too late to stop Ebola, but it's not too late to stop Javascript. All we need is a Javascript vaccine...

View gist:2e1ac69cde933390b81c
$ heroku config:set MY_VAR="language: bash
> branches:
> only:
> - master
> "
Setting config vars and restarting jkutner-test... done, v4
MY_VAR: language: bash
jkutner / Gemfile.rb
Last active August 29, 2015 14:10
JRuby and Puma
View Gemfile.rb
gem "puma", "2.10.2"
$ JRUBY_OPTS=--2.0 bundle
Fetching gem metadata from dependency api due to error (2/3): Bundler::MarshalError ArgumentError: marshal data too short
Retrying dependency api due to error (3/3): Bundler::MarshalError ArgumentError: marshal data too short
Installing rack 1.5.2
Using bundler 1.7.9
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.