Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@mojavelinux
mojavelinux / pom-fragment.xml
Created May 1, 2012 06:54
Maven profile for Tomcat 7 managed adapter
<profile>
<id>arquillian-tomcat-managed</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
@mojavelinux
mojavelinux / arquillian-fragment.xml
Created May 1, 2012 06:58
Container configuration for Tomcat managed 7 (TomEE)
<container qualifier="tomcat-managed-7" default="true">
<configuration>
<property name="catalinaHome">${user.home}/opt/apache-tomee-web-1.0.0</property>
<property name="user">manager</property>
<property name="pass">manager</property>
</configuration>
</container>
@mojavelinux
mojavelinux / AGreeterTest.java
Created May 8, 2012 22:46
Arquillian test with deployment defined on static field
@RunWith(Arquillian.class)
public class AGreeterTest {
@Deployment
public static JavaArchive archive = ShrinkWrap.create(JavaArchive.class)
.addClasses(Greeter.class, PhraseBuilder.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
@Inject
Greeter greeter;
@mojavelinux
mojavelinux / get_project_leads.groovy
Created May 15, 2012 08:01
JBoss Community project leads from JIRA
/**
* This script curates a list all the project leads of JBoss Community projects using the
* issue tracker as the information authority.
*/
// The default TTL in Ivy 2.1.0 is 10 seconds, which results in frequent slow executions. You can get
// faster startup by changing it to a much larger interval.
// Creating the file ~/.groovy/grapeConfig.xml from
// http://svn.codehaus.org/groovy/tags/GROOVY_1_7_10/src/main/groovy/grape/defaultGrapeConfig.xml
// and customize the ttl default property.
@mojavelinux
mojavelinux / slides2png.groovy
Created June 18, 2012 17:27
Export a dzslides presentation to PNGs, then combine into a PDF using geb
/**
* slides2png plays a dzslides presentation using WebDriver, captures each
* slide to a PNG and generates a shell script to collate the PNGs together
* into a PDF using convert (from ImageMagick).
*
* The URL of the presentation is passed as the sole argument to the script.
* If the presentation is local, specify the absolute path prefixed with the
* file:// protocol.
*
* @author Dan Allen
@mojavelinux
mojavelinux / fedora-17-packager.appl
Created July 27, 2012 23:39
BoxGrinder build recipe for Fedora 17 packaging with Gnome desktop
name: fedora-17-packager
summary: Operating system for creating packages for Fedora 17
os:
name: fedora
version: 17
hardware:
cpus: 4
memory: 4096
partitions:
"/":
@mojavelinux
mojavelinux / fedora-java-marketing-brief.asciidoc
Created August 25, 2012 19:51
Fedora Java Marketing Brief (Proposal)

Fedora Java Marketing Brief

TL;DR

  • Java is one of the most popular languages (#2 @ Tiobe Index, #5 @ github, #1 @ sourceforge)

  • ~ 8 million Java developers

  • JVM supports many other languages, which means even more developers

@mojavelinux
mojavelinux / .vimrc
Created December 5, 2012 08:43
AsciiDoc insert-mode mapping helpers for VIM
let mapleader=";"
inoremap <Leader><Leader> <Leader>
if has("autocmd")
au BufRead,BufNewFile *.asciidoc
\ imap <buffer> <C-]> <C-o>B<C-o>E<Right><Space>|
\ imap <buffer> <C-i> <C-o>$<CR><CR>|
\ imap <buffer> <C-j> <Down><C-o>o<CR>|
\ imap <buffer> <Leader>h1 = |
\ imap <buffer> <Leader>h2 == |
@mojavelinux
mojavelinux / example.asciidoc
Created December 7, 2012 01:51
AsciiDoc snippet filter example

Snippets Test

Here’s an example of configuration you need in arquillian.xml to setup Arquillian Ape:

Arquillian Ape configuration
component=beer-advisor-core
source=arquillian.xml
@mojavelinux
mojavelinux / asciidoc.yml
Created December 19, 2012 01:26
First cut at declarative parser and renderer information for Asciidoctor.
:admonition_styles: &ADMONITION_STYLES [NOTE, TIP, IMPORTANT, WARNING, CAUTION]
:default_doctype: article
:default_backend: html5
:headings:
:oneline:
# examples:
#
# = Document Title
#
# == First Section ==