Skip to content

Instantly share code, notes, and snippets.

View IndianGuru's full-sized avatar

IndianGuru IndianGuru

View GitHub Profile
@IndianGuru
IndianGuru / Rakefile2
Created September 4, 2011 10:25
Rake task for Java Launcher
directory 'vendor'
desc 'Install Ruby gems into vendor/'
task :install_gems => 'vendor' do
sh 'jruby -S gem install -i vendor rubyzip'
end
desc 'Build Java launcher that will start the Ruby program'
task :build_launcher do
sh 'javac -cp jruby-complete.jar JavaLauncher.java'
@IndianGuru
IndianGuru / Rakefile3
Created September 4, 2011 10:29
Rakefile for combining into a jar
directory 'vendor'
desc 'Install Ruby gems into vendor/'
task :install_gems => 'vendor' do
sh 'jruby -S gem install -i vendor rubyzip'
end
desc 'Build Java launcher that will start the Ruby program'
task :build_launcher do
sh 'javac -cp jruby-complete.jar JavaLauncher.java'
@IndianGuru
IndianGuru / my.manifest
Created September 4, 2011 10:31
Manifest file
Manifest-Version: 1.0
Class-Path: jruby-complete.jar
.
Main-Class: JavaLauncher
@IndianGuru
IndianGuru / jruby10.rb
Created September 5, 2011 10:07
JRuby and Amazon S3
require "rubygems"
require "bundler/setup"
require 'yaml'
require 'aws-sdk'
#require 'jruby-openssl'
bucket_name = "talim"
file_name = "jrubyaws.txt"
@IndianGuru
IndianGuru / gitc1.txt
Created September 13, 2011 03:46
Git Course code
A@COMP /e/gitlocalrepo
$ git --version
git version 1.7.6.msysgit.0
A@COMP /e/gitlocalrepo
$
@IndianGuru
IndianGuru / jrubyc01.rb
Created September 19, 2011 01:33
JRuby Compiler course example1
require 'benchmark'
def factorial(n)
(1..n).inject(1) { |product, value| product * value }
end
3.times do
timing = Benchmark.measure do
result = factorial(10000)
end
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = https://github.com/joshsoftware/golang-challenge.git
@IndianGuru
IndianGuru / gc1feedback
Last active August 29, 2015 14:16
Go Challenge 1 Feedback
###Francesc Campoy Flores from Google
During my long flight back to San Francisco I had the time to work on the Go challenge. Congrats on the organization! The problem was fun to solve and I'm sure people will learn a lot from it.
###Others
1. Thank you for the challenge. It was fun and an awesome "excuse" to read through some golang source code such as encode/json and image/png.
2. I had a great time working on this. I got a great excuse to browse parts of the standard library I hadn't visited before. I really appreciate the initiative that you guys are taking with this.
@IndianGuru
IndianGuru / githuboq.go
Created April 13, 2015 04:40
Accessing GitHub using Golang
package main
import (
"fmt"
"net/http"
"github.com/google/go-github/github"
"golang.org/x/oauth2"
githuboauth "golang.org/x/oauth2/github"
"html/template"
@IndianGuru
IndianGuru / index.html
Created August 26, 2015 03:30
File index.html
<!DOCTYPE html>
<html>
<head>
<title>Dosa Diner</title>
<meta charset="utf-8">
<link rel="stylesheet" href="stylesheets/dosasite.css">
</head>
<body>