Skip to content

Instantly share code, notes, and snippets.

@justinleveck
justinleveck / gist:5737619
Last active December 18, 2015 06:09
Install Java JDK 7 on Ubuntu

###Install Java JDK 7 on Ubuntu

This package provides Oracle Java JDK 7 (which includes JRE, the Java browser plugin and JavaFX). However, you can’t only install Oracle JRE – the PPA only provides the full Oracle JDK7 package.

  1. To add our PPA and install the latest Oracle Java (JDK) 7 in Ubuntu, use the commands below:

sudo add-apt-repository ppa:webupd8team/java sudo apt-get update && sudo apt-get install oracle-jdk7-installer

  1. After the installation you have enable the jdk:
@justinleveck
justinleveck / Ruby.tmLanguage
Last active December 18, 2015 03:28
Sublime Text 2: Ruby Syntax Customization - Added support for Rails helper methods (e.g. div_for) from rails.vim - Customized Solarized(light) theme for ST2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>
TODO: unresolved issues
text:
"p &lt;&lt; end
@justinleveck
justinleveck / database.yml
Last active December 18, 2015 02:19
PG::Error: ERROR: encoding UTF8 does not match locale en_US
development:
adapter: postgresql
database: x_development
username: vagrant
pool: 5
encoding: utf8
template: template0
test:
@justinleveck
justinleveck / gist:5660915
Created May 28, 2013 06:52
Project Euler - Problem 16
#215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
#What is the sum of the digits of the number 21000?
def exp(base, power)
return base**power
end
def sum_digits(digits)
sum = 0