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
class Symbol
def to_ccom
self case
when :id_in_source
return "IdInInfoSource"
when :guid
return "GUID"
else
return self.to_s.camelize
end
@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 / nodejs.spec
Created June 30, 2011 16:40
node.js spec file used to install node.js from source
%define ver 0.4.6
%define rel 1
%define jobs 2
Name: nodejs
Version: %{ver}
Release: %{rel}
Summary: Node's goal is to provide an easy way to build scalable network programs.
Group: Applications/Internet
License: Copyright Joyent, Inc. and other Node contributors.
@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