Skip to content

Instantly share code, notes, and snippets.

View clinuz's full-sized avatar

Cole Davis clinuz

  • Pandora
  • San Diego, CA
View GitHub Profile
@clinuz
clinuz / linux-shar-bundler-example.sh
Created April 17, 2012 17:38
Example of heredoc and other test types in Bash
#!/bin/sh
#
# This file is part of the xTuple ERP: PostBooks Edition, a free and
# open source Enterprise Resource Planning software suite,
# Copyright (c) 1999-2011 by OpenMFG LLC, d/b/a xTuple.
# It is licensed to you under the Common Public Attribution License
# version 1.0, the full text of which (including xTuple-specific Exhibits)
# is available at www.xtuple.com/CPAL. By using this software, you agree
# to be bound by its terms.
#
@clinuz
clinuz / gist:1817671
Created February 13, 2012 15:38
Search and replace example...
#!/bin/bash
# example...
# sed -E "s/SC.(TableColumn|TableView)/EO.\1/g" $x > tmpfile
# expect 2 args, first is the one to find, second to replace
if [ $# -lt 2 ]
then
echo "You must pass 2 arguments. The first to 'find' and the second to 'replace'"
exit
@clinuz
clinuz / table.js
Created June 17, 2011 02:18
From 103f61481ca1b4d67ccf
context.push(
'<div id="header" style="position: absolute; top:0px; height:32px; left:0px; right:15px; overflow:hidden; background-color:#F8F8F8;">',
'<div style="display:table; width:100%;">',
'<div style="display:table-header-group;">',
'<div style="display:table-row;">'
);
for (idx=0, len=columns.get('length'); idx<len; ++idx) {
col = columns.objectAt(idx);