Skip to content

Instantly share code, notes, and snippets.

@tinchodias
tinchodias / imageget
Created February 8, 2013 09:41
Script for getting latest Pharo 2.0 image
#!/bin/bash
# DOWNLOAD THE LATEST IMAGE ===================================================
IMAGE_URL="http://pharo.gforge.inria.fr/ci/image/20/latest.zip"
wget --progress=bar:force --output-document=image.zip $IMAGE_URL
unzip -qo image.zip
rm -rf image.zip
@tinchodias
tinchodias / vmget
Created February 8, 2013 09:46
Script for getting the latest Cog VM for Pharo
#!/bin/bash
#try to backup (and remove) the current vm ====================================
OLD_VM=/Applications/NBCog-$(date +%-Y-%-m-%-d)-$(date +%H-%M-%S).zip
zip -q -rm $OLD_VM /Applications/NBCog.app
# DOWNLOAD THE LATEST VM ======================================================
VM_URL="http://pharo.gforge.inria.fr/ci/vm/nbcog/mac/nbcog-mac-latest.zip"
wget --progress=bar:force --output-document=vm.zip $VM_URL
#wget --quiet --output-document=vm.zip $VM_URL
@tinchodias
tinchodias / settings.st
Created February 8, 2013 10:12
My Pharo 2.0 settings. I have this file in ~/Library/Preferences/pharo. They are run every time I open a Pharo 2.0 image.
StartupLoader default executeAtomicItems: {
StartupAction
name: 'Settings'
code: [
Author fullName: 'MartinDias'.
World color:Color darkGray darker.
CodeHolder showAnnotationPane: true.
MCCodeTool showAnnotationPane: true.
Deprecation raiseWarning: true.
Debugger alwaysOpenFullDebugger: true.
@tinchodias
tinchodias / goferMigration.st
Created August 13, 2013 11:50
Repository migration from Sthub to Sthub in Pharo3
| conf oldRepository newRepository gofer user pass project |
conf := #ConfigurationOfSandbox.
oldRepository := 'http://smalltalkhub.com/mc/MartinDias/Sandbox/main'.
newRepository := 'http://smalltalkhub.com/mc/MartinDias/Epicea/main'.
user := 'MartinDias'.
pass := '123'.
gofer := Gofer new
package: conf.
@tinchodias
tinchodias / goferMigration2.st
Created January 14, 2015 11:27
Gofer migration 2
packageNames := #(ConfigurationOfEpiceaSorter EpiceaSorter EpiceaSorterAnalysis).
sourceHttpRepository :=
MCSmalltalkhubRepository
owner: 'MartinDias'
project: 'Epicea'
user: 'MartinDias'
password: 'xxxx'.
destinationHttpRepository :=
MCSmalltalkhubRepository
owner: 'MartinDias'
@tinchodias
tinchodias / arbolitoCapture.pde
Created May 31, 2015 13:24
Processing: arbolito capture
/**
* Recursive Tree
* by Daniel Shiffman.
*
* Renders a simple tree-like structure via recursion.
* The branching angle is calculated as a function of
* the horizontal mouse location. Move the mouse left
* and right to change the angle.
*/
(Smalltalk globals
at: #StartupPreferencesLoader
ifAbsent: [ StartupLoader ]) default executeAtomicItems: {
StartupAction
name: 'EpiceaTaskClustererValidation'
code: [
| button total shouldLoad |
(Smalltalk isInteractive
and: [ (Smalltalk globals hasClassNamed: #EpVoter) not
@tinchodias
tinchodias / installScriptForEpiceaTaskClusterer.st
Last active August 29, 2015 14:25
Pharo script to install the script in user system's preferences directory.
| response |
response := ZnEasy get: 'http://gist.githubusercontent.com/tinchodias/8be031b15692cd72bb78/raw/d0d1823b36d88742333a4b672b0bcfa4018417c2/installEpiceaTaskClustererStable.st'.
response isSuccess
ifFalse: [ self error: response printString ]
ifTrue: [
(FileLocator preferences asFileReference / 'pharo') ensureCreateDirectory.
(FileLocator preferences asFileReference / 'pharo' / 'installEpiceaTaskClustererStable.st') writeStreamDo: [ :stream |
stream nextPutAll: response contents ] ]
Smalltalk evaluate: (ZnEasy get: 'http://gist.githubusercontent.com/tinchodias/c789ab74e1cb981351c2/raw/6f7895dc6df4ea2838dfc2fb8c20d20083552b81/installScriptForEpiceaTaskClusterer.st') contents
(Smalltalk globals
at: #StartupPreferencesLoader
ifAbsent: [ StartupLoader ]) default executeAtomicItems: {
StartupAction
name: 'EpiceaLoad'
code: [
| button total shouldLoad |
(Smalltalk isInteractive
and: [ (Smalltalk globals hasClassNamed: #EpMonitor) not