This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Reference: http://stdioe.blogspot.com/2012/01/creating-virtual-machine-with.html | |
VM_NAME="Debian Squeeze 2" | |
DEBIAN_CD_IMAGE="debian-6.0.7-amd64-netinst.iso" | |
# Create VM | |
VBoxManage createvm --name "$VM_NAME" --ostype Debian_64 --register | |
# VM Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OSProcess thisOSProcess environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%glr; | |
%prefix Le; | |
%root AnnotationParse; | |
%suffix Node; | |
%hierarchy Argument ( | |
AlignmentArgument | |
CodeExpandedArgument | |
DbArgument | |
ExpandedArgument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shortcutBuilder := [ :world :key :action | | |
BlShortcutWithAction new | |
repeatable: false; | |
combination: (BlSingleKeyCombination new key: key); | |
action: [ | |
| showElements | | |
showElements := world root allChildrenBreadthFirstSelect: [ :c | c isKindOf: GtSlideShowElement ]. | |
showElements do: action ] ]. | |
GtWorld allInstances do: [ :w | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Adapted from http://www.slideshare.net/nourybouraqadi/pharo-networking-by-example | |
$! denotes the end of a message | |
" | |
| connectionSock interactSock request stream | | |
connectionSock := Socket newTCP. | |
[ | |
connectionSock listenOn: 8888 backlogSize: 10. | |
interactSock := connectionSock waitForAcceptFor: 15. | |
stream := SocketStream on: interactSock. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fetched -> BaselineOfTesseract-CompatibleUserName.1601486715 --- git@github.com:seandenigris/Tesseract-St.git[master] --- git@github.com:seandenigris/Tesseract-St.git[master] | |
Loaded -> BaselineOfTesseract-CompatibleUserName.1601486715 --- git@github.com:seandenigris/Tesseract-St.git[master] --- git@github.com:seandenigris/Tesseract-St.git[master] | |
Loading baseline of BaselineOfTesseract... | |
Fetched -> BaselineOfOSSubprocess-CompatibleUserName.1588868295 --- git@github.com:pharo-contributions/OSSubprocess.git[master] --- git@github.com:pharo-contributions/OSSubprocess.git[master] | |
Loaded -> BaselineOfOSSubprocess-CompatibleUserName.1588868295 --- git@github.com:pharo-contributions/OSSubprocess.git[master] --- git@github.com:pharo-contributions/OSSubprocess.git[master] | |
Fetched -> BaselineOfTempfile-CompatibleUserName.1600111301 --- git@github.com:seandenigris/TempfileSt.git[master] --- git@github.com:seandenigris/TempfileSt.git[master] | |
Loaded -> BaselineOfTempfile-CompatibleUserName.1600111301 --- git@github.com:s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"There are generally better ways (e.g. Ramon Leon's Simple Image-based Persistence), but this is as simple as it gets." | |
object := Morph new | |
color: Color white; | |
extent: 500@500. | |
serialized := object storeString. | |
(Compiler evaluate: serialized) openInWorld. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onsets := { | |
'14 March 2020'. | |
'17 March 2020'. | |
'18 March 2020'. | |
'19 March 2020'. | |
'16 March 2020'. | |
'20 March 2020'. | |
'21 March 2020'. | |
'18 March 2020'. | |
'21 March 2020'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Works out of the box in Pharo 2.0. For prior versions (definitely works in 1.3 and 1.4), first file in https://gist.github.com/2602113" | |
| command | | |
[ | |
command := FileStream stdin nextLine. | |
command ~= 'exit' ] whileTrue: [ | result | | |
result := Compiler evaluate: command. | |
FileStream stdout nextPutAll: result asString; lf ]. | |
Smalltalk snapshot: false andQuit: true. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Requires at least the Spec version from Pharo 2.0" | |
| layout widget | | |
model := DynamicComposableModel new. | |
layout := SpecLayout composed. | |
layout newColumn: [ :col | | |
{1. 2. 3} do: [:e | | selector | | |
selector := ('accessorTo', e asString) asSymbol. | |
model instantiateModels: {selector. #TextInputFieldModel}. | |
widget := model perform: selector. |
NewerOlder