Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>JRuby IRB</title>
<meta charset="utf-8">
<style type="text/css">
.code {font-family: "Courier New", Courier, mono;}
</style>
</head>
<body>
#!/usr/bin/python
WhatThisIS="""
This is a hacked together script to connect to all of your running EC2 instances, and to provide a single SSH prompt amongst all of them, and to assist in uploading, splitting, and downloading files. email me at winniningham at and email server called gmail.com :P
"""
import paramiko
from numpy import *
# 1) Put this file in your working directory
# 2) run 'sudo gem install active_support grit'
# 3) run 'ruby git-line-count.rb'
# 4) run 'open loc.html'
# 5) yay
require 'rubygems'
require 'active_support'
require 'grit'
require 'open-uri'
require 'rubygems'
require 'neo4j'
include Neo4j
Transaction.new
# create some people
andreas = Node.new :name => 'andreas'
peter = Node.new :name => 'peter'
kalle = Node.new :name => 'kalle'
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
<!DOCTYPE html>
<!--
Copyright 2010 Google Inc.
All rights reserved.
Original slides:
Marcin Wichary
Modifications:
Ernest Delgado
Alex Russell
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal