This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
spec:ci_interpreted_18_19: | |
[echo] Running rake spec:ci_interpreted_18_19 | |
[echo] compile=OFF, threshold=20, objectspace=true threadpool=false reflection=false | |
[java] JAVA options: {:fork=>"true", :failonerror=>"true", :classname=>"org.jruby.Main", :maxmemory=>"1024M"} | |
[java] NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. | |
[java] Gem.source_index called from /home/sebastien/dev/jruby/build/classes/jruby/jruby/commands.rb:36. | |
[java] NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01. | |
[java] Gem::SourceIndex#search called from /home/sebastien/dev/jruby/build/classes/jruby/jruby/commands.rb:36. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env jruby | |
require 'java' | |
JVMS = ["/home/sebastien/dev/jdk1.6.0_25", | |
"/home/sebastien/dev/jdk1.6.0_30", | |
"/home/sebastien/dev/jdk1.7.0_02"] | |
current_java_home = ENV['JAVA_HOME'] | |
if ARGV.size != 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Format a pom file - and pretty much any othe file! | |
(defun format-pom () | |
"formats a pom.xml file" | |
(interactive) | |
(progn (indent-region (point-min) (point-max)) | |
(delete-trailing-whitespace))) | |
(defun untabify-all () | |
"untabifies a whole buffer" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install gem: | |
# jruby -S gem install mvn:commons-lang:commons-lang | |
require 'java' | |
require 'rubygems' | |
require 'maven/commons-lang/commons-lang' | |
java_import 'org.apache.commons.lang.StringUtils' | |
puts StringUtils::count_matches('totototo', 'to') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sebastien@kilkenny:~/tmp$ echo > build.gradle | |
sebastien@kilkenny:~/tmp$ gradle t | |
:tasks | |
------------------------------------------------------------ | |
All tasks runnable from root project | |
------------------------------------------------------------ | |
Help tasks | |
---------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
fsck -p /dev/sda3 | |
fsck -p /dev/sdb5 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>TODO</groupId> | |
<artifactId>TODO</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<name>TODO app name</name> | |
<properties> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of .jrubyrc | |
# Set compilation mode. JIT = at runtime; FORCE = before execution. (JIT, FORCE, OFF, OFFIR) | |
# compile.mode = FORCE | |
# Dump to console all bytecode generated at runtime. | |
# compile.dump = true | |
# Enable verbose JIT logging (reports failed compilation) | |
# jit.logging.verbose = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_names = ['script.sql'] | |
file_names.each do |file_name| | |
text = File.read(file_name) | |
File.open(file_name, 'wb') do | |
|file| | |
file.write(text.gsub(/\s*AUTO_INCREMENT\s*(\=\s*[0-9]+)?/, "")) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'erb' | |
mappings = [] | |
features = File.join("**", "*.java") | |
current_dir = ARGV[0] | |
Dir.chdir(current_dir) | |
Dir.glob(features).each do |file_name| | |
puts "Processing #{file_name}" if $DEBUG | |