Skip to content

Instantly share code, notes, and snippets.

View Yardboy's full-sized avatar

Cayce Balara Yardboy

View GitHub Profile
#!/bin/bash
# Based on terrbear's "html2haml an entire directory" at http://terrbear.org/?p=277
# This script needs to be executable and located somewhere in your PATH
CMD=`basename $0`
if [ -z "$1" ]; then
wdir="."
else
wdir=$1
<ul>
<li>
Level 1 Item 1
<ul>
<li>
Level 1-1 Item 1
<ul>
<li>
Level 1-1-1 Item 1
</li>
@Yardboy
Yardboy / manifest.xml
Created January 20, 2011 22:49
HappyMapper class definition puzzler
<manifest>
<organization>
<item identifier="ITEM-6137565f-18fe-481f-b6ce-a290a354c862" isvisible="true">
<title>Math</title>
<item identifier="ITEM-5781bd41-7acd-4373-8ccd-37bd074c2461">
<title>Grade 07</title>
<item identifier="ITEM-d7035880-88a5-4501-9865-f6265ba8022c" identifierref="i-179211">
<title>qti_200535.xml</title>
</item>
<item identifier="ITEM-b13ebebd-f942-4ee8-a342-e8c3913c9063" identifierref="i-194469">
@Yardboy
Yardboy / regex_help.txt
Created February 5, 2011 13:48
I need some regex help...
Solved, with some help from StackOverflow that I apparently missed the first time around
(http://stackoverflow.com/questions/2013124/regex-matching-up-to-the-first-occurrence-of-a-character):
/<simpleChoice[^>]*>/
Match "<simpleChoice" plus any and all characters that do not match ">" followed by a ">".
[^>]* is a set of "zero or more characters that do not match >"
@Yardboy
Yardboy / javascript.js
Created February 7, 2011 03:21
site hover function review
// the function gets called inline via the onmouseover and onmouseout events like this
P7_MultiClass2('L3','show','nav_03','active_03')"
// essentially, the function is using the calling parameters to set set the classname for another item on the page
// since the classname they're adding is the "active_03", "active_04", etc., this is triggering the display of
// the submenu when you hover the nav item.
function P7_MultiClass2() {
var args=P7_MultiClass2.arguments;
// so, args = ['L3','show','nav_03','active_03']
if(document.getElementById) {
@Yardboy
Yardboy / Fish Applet Object Code
Created September 3, 2012 22:51
Fish Applet Object Code
<object type="application/x-shockwave-flash" style="outline:none;" data="http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/fish.swf?up_fishName=GroovyFish&amp;up_fishColor10=66420C&amp;up_fishColor3=4340F4&amp;up_fishColor8=FA0047&amp;up_fishColor9=6A8038&amp;up_fishColor7=40C7F4&amp;up_numFish=10&amp;up_backgroundImage=http://&amp;up_fishColor4=F4E540&amp;up_foodColor=66420C&amp;up_fishColor2=DC40F4&amp;up_fishColor1=F45540&amp;up_fishColor6=F48540&amp;up_fishColor5=40F45E&amp;up_backgroundColor=C5DDFA&amp;" width="500" height="333"><param name="movie" value="http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/fish.swf?up_fishName=GroovyFish&amp;up_fishColor10=66420C&amp;up_fishColor3=4340F4&amp;up_fishColor8=FA0047&amp;up_fishColor9=6A8038&amp;up_fishColor7=40C7F4&amp;up_numFish=10&amp;up_backgroundImage=http://&amp;up_fishColor4=F4E540&amp;up_foodColor=66420C&amp;up_fishColor2=DC40F4&amp;up_fishColor1=F45540&amp;up_fishColor6=F48540&amp;up_fishColor5=40F45E&amp;up_backgroundCo
@Yardboy
Yardboy / rumblestackscripterrors
Created October 13, 2012 00:14
Rumble stack script stalled, errors
Setting up libtinfo-dev (5.9-4) ...
Setting up libreadline6-dev (6.2-8) ...
Setting up libreadline-dev (6.2-8) ...
Installing: Ruby
--2012-10-13 00:07:21-- ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
=> `ruby-1.9.3-p194.tar.gz'
Resolving ftp.ruby-lang.org (ftp.ruby-lang.org)... 221.186.184.68
Connecting to ftp.ruby-lang.org (ftp.ruby-lang.org)|221.186.184.68|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
@Yardboy
Yardboy / gist:4278677
Created December 13, 2012 18:53
Splitting into three, splitting into four.
# Let's say you have a collection of seven items:
['a', 'b', 'c', 'd', 'e', 'f', 'g']
# and you want to split it into three groups. What should the result be?
A.
[
['a', 'b', 'c'],
['d', 'e'],
district_rankings_options[0] = {
chart: {
renderTo: 'district_rankings_chart',
type: 'column',
height: 400,
shadow: false
},
legend: false,
plotOptions: {
series: {
@Yardboy
Yardboy / gist:8293540
Last active January 2, 2016 10:59
Capitalization or Expensing of Software Development Costs
C:
---
To my knowkedge, the capitalization or expensing of costs related to software development depend on the
type of activity, not how the project might have been planned. For instance, planning and feasibility
research type costs are to be expensed when incurred, while application development costs are
capitalized. In the case of software to be sold, there is also a determination of feasbility point to
be considered when drawing the line between expense as incurred and capitalize. I believe the guiding
standards come from FASB 86 and AICPA SOP 98-1.
R's question seemed to imply that this was a "univeral rule", so I would be interested to hear what