Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am josht on github.
* I am jtambunga (https://keybase.io/jtambunga) on keybase.
* I have a public key ASCLOQBO9jBuMOIhX83Xe5tbBEJDmaMVQvd-IXORCKViLQo
To claim this, I am signing this object:
@josht
josht / gist:853549
Created March 3, 2011 21:02
export to uda
var
exportType:String;
exportFormat:String;
extxt:String;
itemStr:string;
procedure csv;
begin
exportType := 'csv';
End;
@josht
josht / gist:832883
Created February 17, 2011 22:33
get model path and addPackage, then create the tables and finally alter the table incase an old version was already there
$modelPath = $modx->getOption('faqman.core_path',null,$modx->getOption('core_path').'components/faqman/').'model/';
$modx->addPackage('faqman',$modelPath);
$manager = $modx->getManager();
$manager->createObjectContainer('faqManItem');
$manager->createObjectContainer('faqManSet');
$modx->exec("
ALTER TABLE {$modx->getTableName('faqManItem')}
@josht
josht / gist:830224
Created February 16, 2011 21:16
create digitizer item in planswift
myitem := NewItem('\Job\Takeoff', 'Area', 'Auto Area Test');
Result := EditItem(myitem);
if (Result = 'True') then begin
mysection := NewSection(myitem, 'Section');
if (mysection = '') then begin
DeleteItem(myitem);
end
else begin
@josht
josht / PlanswiftItemNumGenerator.pas
Created November 11, 2010 21:30
planswift random item# generator
// This will recursively check if the new randomid is already in use
function Exists(randomid:String;path:string):Boolean
Begin
// If no path is set, then the search starts in the Storages root
if (path = '') then begin
path := '\Storages';
end;
curItem := Planswift.GetItem(path);