Skip to content

Instantly share code, notes, and snippets.

View bendalton's full-sized avatar

Ben Dalton bendalton

View GitHub Profile
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
private function doArr(e:ResultEvent):void{
var res:Object = e.result.serverInfo;
for each(var arr:Array in res.initialData){
var obj:Object = new Object();
for (var i:int; i < res.columnNames.length; i++){
obj[res.columnNames[i]] = res.initialData[i];
}
arrProvider.addItem(obj);
}
}
// Example usage
// var myResultCollection:ArrayCollection = parseResult(event.result.serverInfo);
public function parseResult(result:Object):ArrayCollection
{
var collection:ArrayCollection = new ArrayCollection();
for each(var resultArray:Array in result.initialData)
Apr 30, 2009 12:48:25 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/MessageBoard-0.1]
Apr 30, 2009 12:48:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive MessageBoard-0.1.war
Apr 30, 2009 12:48:30 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 30, 2009 12:48:30 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/MessageBoard-0.1] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
<?php
// Block to display field_right_sidebar
if(arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
print(content_format('field_right_sidebar', $node->field_right_sidebar[0], 'default', $node));
}?>
[root@daltonconsulting rideamigos.com]# pear upgrade-all
PHP Warning: PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
Will upgrade archive_tar
Will upgrade console_getopt
Will upgrade log
Will upgrade pear
@bendalton
bendalton / killChromeFlash
Created January 25, 2011 17:14
quick shell script for getting rid of Chrome's Built-in Flash player so you can use the Debug version
#!/bin/bash
find /Applications/Google\ Chrome.app/Contents/Versions -name Flash\ Player\ Plugin\ for\ Chrome.plugin -ok sudo rm -rf '{}' \;
@bendalton
bendalton / gist:1197987
Created September 6, 2011 16:05
javascript for CF Devs... feedback
Overall very well done and I didn't see any technical errors in my read through.
Just a couple of things that I would point out...
for..in loop for an array in JS is possible but will likely provide unexpected results and should probably be avoided in favor of a traditional for loop
http://stackoverflow.com/questions/5263847/javascript-difference-between-for-in-and-for
http://stackoverflow.com/questions/500504/javascript-for-in-with-arrays
@bendalton
bendalton / Example.mxml
Created October 20, 2011 19:32
HTTPService Example
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<s:HTTPService id="service" url="http://yoururl.com/file/blah" resultFormat="text"/>
</fx:Declarations>
<s:layout>
<s:VerticalLayout/>
</s:layout>
@bendalton
bendalton / break_even.mxml
Created October 26, 2011 15:42
BREAK-EVEN AREA CHART WITH FLEX
<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="generateChartData()">
<mx:Script><![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var chartData:ArrayCollection;
public function generateChartData():void
{