Skip to content

Instantly share code, notes, and snippets.

View dalehenrich's full-sized avatar

Dale Henrichs dalehenrich

View GitHub Profile
@dalehenrich
dalehenrich / gist:e1575a41bc59ae1ef4f6
Created January 12, 2015 01:53
example script definition
[ :topez :objIn :tokens :command :commandNode |
| opts args |
"for help: ./example -h"
command
getOptsMixedLongShort:
{#('help' $h #'none').
#('clear' nil #'none').
#('client' nil #'required').
#('interactive' nil #'none').
#('model' nil #'required').
@dalehenrich
dalehenrich / gist:678813800cb7d5065945
Created January 12, 2015 01:54
example help text
NAME
example - example sript utility template
SYNOPSIS
example [-h|--help]
example --register=<server-name> --model=[parallel|serial] [--trace] [--interactive]
example --unregister=<server-name>
example --reset
example --remoteStart=<server-name>
example --remoteRestart=<server-name>
@dalehenrich
dalehenrich / bug.st
Last active September 12, 2015 17:35
[ :topez :objIn :tokens :command :commandNode |
| opts args |
"for help: ./bug -h"
command
getOptsMixedLongShort:
{#('help' $h #'none').
#('browse' nil #'required').
#('clean' nil #'none').
#('confirm' nil #'none').
#('gc' nil #'none').
gs version; edit # stone version information
--------------------
5@ -> 'gsBuildSerialNum'->'64bit-37456-PRIVATE'
6@ -> 'gsBuildType'->'FAST'
7@ -> 'gsRelease'->'3.3.0'
./bug --load=GemStoneClassMigration-MarianoMartinezPeck.1
./bug --populate
./bug --history
--------------------
@dalehenrich
dalehenrich / resetSHOUTGlobals.st
Last active September 22, 2015 17:27
reset SHOUT globals
[ :topez :objIn :tokens :command :commandNode |
| opts args |
"for help: ./resetSHOUTGlobals -h"
command
getOptsMixedLongShort: {#('help' $h #'none')}
optionsAndArguments: [ :options :operands |
opts := options.
args := operands ].
opts
at: 'help'
@dalehenrich
dalehenrich / resetSHOUTGlobals.ston
Last active September 22, 2015 17:28
reset SHOUT Global tode script
TDScriptLeafNode{#name:'resetSHOUTGlobals',#contents:'[ :topez :objIn :tokens :command :commandNode |
| opts args |
\"for help: ./resetSHOUTGlobals -h\"
command
getOptsMixedLongShort: {#(\'help\' $h #\'none\')}
optionsAndArguments: [ :options :operands |
opts := options.
args := operands ].
opts
at: \'help\'
@dalehenrich
dalehenrich / smalltalkProjectSructure.md
Created February 23, 2012 10:19
Proposed Smalltalk project directory structure

##Monticello Package Structure

The basic idea is to store individual methods in files so that git can manage method-level history. The split between classes and extensions in the snapshot directory is differentiate between classes defined in a package and extension methods defined in the package:

+-Sample-Core.pkg\
  +-snapshot\
  | +-classes\
  | | +-SampleCore.class\
  | |   +-SampleCore.st
@dalehenrich
dalehenrich / MetacelloProjectSpecifications.st
Created February 23, 2012 10:45
Answer the question: How do I edit specs for a project stored in git?
'From Pharo1.3 of 16 June 2011 [Latest update: #13315] on 23 February 2012 at 2:38:04 am'!
Object subclass: #MetacelloProjectSpecifications
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'MetacelloProjectSpecifications'!
!MetacelloProjectSpecifications methodsFor: 'Sample.source' stamp: 'dkh 2/23/2012 02:34'!
core: spec
<project: 'Sample.source' package: 'Core.pkg'>
@dalehenrich
dalehenrich / assumptions.md
Created February 23, 2012 17:36
List of assumptions about using git for managing Smalltalk source
  1. I assume that by moving to a disk-based structure, we are expecting folks to edit and modify directory structure on disk using the shell and standard editors. This means that all information is going to be stored in plain test files. No binary files. Binary files may be stored in the project structure for use by developers, but the mechanisms for loading code into an image from disk must not involve binary files.

  2. I assume that we will preserve package structure on disk. This means that at a minimum we must be able to preserve the collection of class and method definitions that make up a Monticello package. This includes traits and any other standard definitions that are currently present in a Monticello package. In practice "preserving the package structure" means that one can load a package from disk and then save the package to disk in another location and the directory structure is "identical". The package loader must be respectful of files and directories that are not part of the official package

@dalehenrich
dalehenrich / bootstrapGit.st
Created February 23, 2012 17:51
Bootstrap git support into a Pharo image
"Note that the the git work has not even achieved alpha, yet, so don't
bootstrap into an image that you care about:)
Assuming Pharo 1.3"
"Bootstrap filetree code"
Gofer new
url: 'http://ss3.gemstone.com/ss/FileTree';
package: 'ConfigurationOfFileTree';
load.