Skip to content

Instantly share code, notes, and snippets.

View BrandonMathis's full-sized avatar
🌸
me like code

BrandonMathis BrandonMathis

🌸
me like code
View GitHub Profile
@BrandonMathis
BrandonMathis / desired_ouput.xml
Created January 31, 2011 21:56
JRuby Nokogiri generate CCOM type raketask
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Entity xsi:type="EntityType">
<GUID>c014e3c1-0fb2-012e-8f94-549a20e02a6a</GUID>
<Tag>Adapter Plate</Tag>
<Status>1</Status>
</Entity>
</root>
@BrandonMathis
BrandonMathis / tzreconfig.sh
Created May 2, 2011 17:53
Reconfig Ubuntu Timezone
#!/bin/bash
sudo dpkg-reconfigure tzdata
@BrandonMathis
BrandonMathis / update.sh
Created May 5, 2011 00:19
Shell command to update outdated homebrew brews
brew outdated | cut -f 1 -d "(" | xargs brew install
@BrandonMathis
BrandonMathis / submodule
Created May 12, 2011 14:20
Handeling Submodules
git submodule update --merge
@BrandonMathis
BrandonMathis / 1dl_epel.sh
Created June 13, 2011 21:23
Setup MongoDB on RedHat
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
@BrandonMathis
BrandonMathis / README.md
Created June 21, 2011 20:02
bad string size error

The log exert bellow is result of a error that is caused in the IOMOG Register by loading in the suspect XML bellow.

The XML bellow is the Taxonomy Tree for UnitType

@BrandonMathis
BrandonMathis / gist:1120163
Created August 2, 2011 13:20
Delete all unstaged files
git status --porcelain | awk '$1 == "??" {print $2}' | xargs rm -r
@BrandonMathis
BrandonMathis / gist:1132519
Created August 8, 2011 19:31
Query for events
SELECT node.nid AS nid, node.title AS node_title, node_data_field_date.field_event_location_value AS node_data_field_date_field_event_location_value, node.type AS node_type, node.vid AS node_vid, node.created AS node_created, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format, node_data_field_weight.field_weight_value AS node_data_field_weight_field_weight_value FROM drup_node node LEFT JOIN drup_content_type_event node_data_field_date ON node.vid = node_data_field_date.vid LEFT JOIN drup_node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN drup_content_field_weight node_data_field_weight ON node.vid = node_data_field_weight.vid WHERE ((node.type in ('event')) AND (node.status <> 0)) AND (DATE_FORMAT(CONVERT_TZ(STR_TO_DATE(node_data_field_date.field_date_value2, '%Y-%m-%dT%T'), 'UTC', 'America/New_York'), '%Y-%m') >= '2011-08') ORDER BY node_data_field_weight_field_weight_value ASC
@BrandonMathis
BrandonMathis / gist:1203503
Created September 8, 2011 14:16
Example exported XML
<CCOMData xmlns="http://www.mimosa.org/osa-eai/v3-2-3-RC8/xml/CCOM-ML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Entity xsi:type="Enterprise">
<GUID>eaf1e000-d986-11e0-9572-0800200c9a66</GUID>
<IDInInfoSource>1029</IDInInfoSource>
<Tag>IOM-OG</Tag>
<Name>IOM-OG</Name>
<LastEdited>2009-07-03T13:30:00</LastEdited>
<Status>1</Status>
<Type>
<GUID>f1984c50-d986-11e0-9572-0800200c9a66</GUID>
@BrandonMathis
BrandonMathis / .htaccess
Created September 10, 2011 00:09
sinatra htaccess for bluehost
# General Apache options
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
#Options +FollowSymLinks +ExecCGI
# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*