Skip to content

Instantly share code, notes, and snippets.

@jrichter
jrichter / erb.lang
Created October 3, 2009 22:04
For erb text highlighting in gedit. put it here: /usr/share/gtksourceview-2.0/language-specs/
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is a smashup by Justin Richter of html.lang and ruby.lang
html.lang
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
ruby.lang
Author: Archit Baweja <bighead@users.sourceforge.net>
Copyright (C) 2004 Archit Baweja <bighead@users.sourceforge.net>
This is neat. Here is my erb file.
<% content_for :sidebar do %>
<%= link_to 'New user', new_user_path %>
<% end %>
<h1>Listing users</h1>
<% @users.each do |user| %>
<% if user.sessions.size > 0 %>
<p class="logged_in">
def self.read_files_and_create_reports
@filenames = []
pids = []
dir = "public/txt_reports"
Dir.foreach(dir) do |entry|
if entry.include? ".txt"
@filenames << entry
end
end
do_work_concurrently(@filenames, dir, 2)