Public Gists by xmlblog

Gravatar
Wed Jun 03 10:01:01 -0700 2009
1
2
3
# Report has event loop, knows type of input log it's looking for
class Report
  cattr_reader :header, :combined_log
Gravatar
Wed Jun 03 09:22:30 -0700 2009
1
2
3
require 'config/environment'
 
def create_reports
Gravatar
Wed Jun 03 09:08:36 -0700 2009
1
2
3
class ActivateDeviceReport < Report
  fields :time, :date :call_id, :exec_time, :account_number, :sr_number, :serial_number , :output, :das_server
  pattern /^(\d{2}:\d{2}:\d{2},\d{3}).*?(\d{2}\/\d{2})\s(\w*?)\s.*?\[execution\(activateDevice\)\].*?(\d*)ms.*?accountNumber=(\d*?),srNumber=(\d*?)\],serialNumber=(.*?),.*?output\s=\s(.*?)/
Gravatar
Wed Jun 03 08:59:10 -0700 2009
1
2
3
class Report
  
  BLANK = "".freeze
gist: 118980 If you go to http://www.ncl...
Gravatar
Wed May 27 16:31:10 -0700 2009
1
2
3
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code='',s_objectID;function s_gi(un,pg,ss){var c="=fun@5(~){`Ks=^Q~$d ~.substring(~.indexOf(~;@r~`l@r~=new Fun@5(~.toLowerCase()~s_c_il['+s^qn+']~};s.~.length~.toUpperCase~=new Object~s.wd~','~"
+"){@r~t^s~.location~')q='~var ~s.pt(~dynamicAccount~link~s.apv~='+@w(~)@rx^l!Object$aObject.prototype$aObject.prototype[x])~);s.~Element~.getTime()~=new Array~ookieDomainPeriods~s.m_~.protocol~=new "
Gravatar
Thu May 14 13:34:41 -0700 2009
1
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
gist: 101125 Disable Cruise Details Link...
Gravatar
Fri Apr 24 07:23:30 -0700 2009
1
2
3
Evt.onDOMReady(function () {
  Dom.getElementsByClassName('selectCruise', 'A', 'travelOptions', function (el) { el.style.display = 'none'; });
});
Gravatar
Thu Apr 23 14:53:06 -0700 2009
1
2
3
class Report
  
  attr_reader :input, :output
gist: 97160 String Reverse for Javascript
Gravatar
Fri Apr 17 10:56:16 -0700 2009
1
2
3
// The fastest way to reverse a string....
String.prototype.reverse = function () {
  return this.split("").reverse().join("");
gist: 91294 Add a "Delete Page" button ...
Gravatar
Tue Apr 07 08:37:56 -0700 2009
1
2
3
// ==UserScript==
// @name Delete Page
// @namespace com.ncl
gist: 85531 Font replace H1 or H6 with ...
Gravatar
Wed Mar 25 08:41:23 -0700 2009
1
2
3
Dom.getElementsBy(function (el) {
  return el.tagName.match(/^H[16]$/) && el.className.match(/title/i);
}, null, 'frame', Cufon.replace);
Gravatar
Wed Feb 25 09:43:33 -0800 2009
1
2
3
var links = Dom.getElementsBy(function (el) {
  return el.href.match(/pica9/);
}, 'A', 'menu_travel_tools');
Gravatar
Wed Feb 04 14:54:37 -0800 2009
1
2
3
build do
  copy 'src/specs', 'target/specs' do |filter|
    filter.created_at < Time.now && filter.version == current_version
gist: 57091 ...from AWS::S3
Gravatar
Mon Feb 02 12:54:48 -0800 2009
1
2
3
        def request(verb, path, options = {}, body = nil, attempts = 0, &block)
          Service.response = nil
          process_options!(options, verb)
gist: 50222 Edited to remove the before...
Gravatar
Wed Jan 21 13:39:41 -0800 2009
1
2
3
...
<div id="q3" style="display: block;">
  <%= content_tag(
gist: 45151 Update Git Documentation on...
Gravatar
Fri Jan 09 08:15:41 -0800 2009
1
2
3
# Usage: git-doc-up 1.6.1
function git-doc-up() {
  wget http://www.kernel.org/pub/software/scm/git/git-manpages-$1.tar.bz2
gist: 38516 Forcing Rails to Think a Re...
Gravatar
Sat Dec 20 18:37:11 -0800 2008
1
2
3
# app/controllers/application.rb
 
class ApplicationController < ActionController::Base
Gravatar
Mon Nov 24 13:46:48 -0800 2008
1
2
3
rake auth:gen:site_key # Generates config/initializers/site_keys.rb
rake cruise:test # Run all the specifications after resetting test database
rake db:abort_if_pending_migrations # Raises an error if there are pending migrations
Gravatar
Tue Nov 18 10:17:38 -0800 2008
1
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r
gist: 20790 Granted the user conditions...
Gravatar
Wed Oct 29 12:30:37 -0700 2008
1
2
3
<!-- Ahhh, cleaner :) -->
<% privileged_users do %>
  <%= render :partial => 'admin/menu' %>