Skip to content

Instantly share code, notes, and snippets.

View vic's full-sized avatar
🤮
puke nuke

Victor Borja vic

🤮
puke nuke
View GitHub Profile
@vic
vic / Main.java
Created September 26, 2008 19:10
import org.jruby.*;
/*
The use case I have:
- Create a JRuby runtime
- Load a gem on it .. actually that gem ("buildr") requires many other gems and takes a lot of time to get them loaded (about 2secs)
- Use that preloaded runtime to create clones
- Load a buildfile on that clone, without affecting the original runtime
- drop the used cloned runtime,
@vic
vic / README
Created October 17, 2008 23:23
This example shows how to use a DRb client/server
with buildr 1.3.3.
Invoke this file the first time with a --drb flag
to start the server. If no --drb flag is present
we connect to the server.
Features:
- Execution of tasks on a previously loaded buildfile
- buildfile reloading if modified.# - NO CLIENT OUTPUT redirection is implemented.
// ==UserScript==
// @name Gmail w/ Collapsible & Minimalist Inbox plus Google Calendar, Reader, Notebook, etc... Seamless Integration
// @namespace mail.google.com
// @include http://mail.google.com/*
// @include https://mail.google.com/*
// ==/UserScript==
var USER_CONFIGURATION =
{
ELEMENTS: //Place in order the pages you would like to load. Placing mail in the list will may it collapsible. Other choices are: reader, calendar, notebook or groups (must be lowercase.)
describe("JS.Spec", function() {
it("supports pending examples");
describe("be nested group", function() {
it("intentionally fails for undefined value", function() {
(undefined).should( be(undefined) )
});
<html>
<head>
<title> hello.html </title>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/utils.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/module.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/class.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/kernel.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/circulate.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//core/interface.js?raw=true"></script>
<script type="text/javascript" src="http://github.com/vic/js.class/tree/spec/source//enumerable.js?raw=true"></script>
@vic
vic / redy.js
Created November 5, 2008 18:43
/**
* Redy - a prototype for a ruby like javascript.
* Parts of this software are derived from JS.Class by James Coglan.
*
*
* This file is licensed under the Ruby licenense.
* Copyright 2008. Victor Hugo Borja <vic.borja gmail.com>
*/
Redy = {
@vic
vic / README
Created February 19, 2009 02:54
An attempt to parse Ioke in javascript
To compile the grammar you need the antlr jar provided with ioke.
A v8 linux binary has been included to run the test.js
There seems to be a bug in the port of ioke.g, it doesnt create
tree for a simple ioke expr.
I think Ioke would be a wondeful language to have on the browser. It's very lightweight and I believe it would be wonderful to have it's homoiconic power for scripting webpages. Given that Ioke's primary platform is the JVM, I think we could develop some webapps that inject ioke code to the browser. Ioke's syntax would also allows to define web DSL
div(class: "content",
p("This is a paragraph")
script(language: "ioke",
@vic
vic / Mikefile
Created February 26, 2009 22:25
A sample Mikefile
;; -*- ioke -*-
;;
;; This is a sample Mikefile.
;; Mike is a build system for Ioke, along the lines of ruby's rake.
;; It is still young, awaiting for more specs to be written and
;; having full Java support to call ant tasks, etc.
;; To test Mike, you need the development branch from
;; http://github.com/vic/ioke/tree/mike
@vic
vic / HelloWorldRunnable.ak
Created July 21, 2010 21:44
Hello world example in Akin Java
# Hello World example in Akin Java
#
# Akin (http://github.com/vic/akin)
package: akin example.
# I made imports explicit just to show
# how to import classes static members
import: java lang String,