Skip to content

Instantly share code, notes, and snippets.

View philippeback's full-sized avatar
👽
Hackin'

Philippe Back philippeback

👽
Hackin'
View GitHub Profile
@philippeback
philippeback / MondrianConnect.st
Created February 11, 2018 21:40
Mondrian Connect
el1 := 1.
el2 := 2.
view := RTMondrian new.
view shape rectangle.
view nodes: {el1. el2} .
view edges
shape: (
(RTGradientColoredLine new)
@philippeback
philippeback / RoassalConnection.st
Created February 11, 2018 19:25
Roassal Connection
v := RTView new.
elementShape := RTEllipse new size: 10; color: Color green trans.
e1 := elementShape elementOn: 'Start'.
e2 := elementShape elementOn: 'End'.
v add: e1.
v add: e2.
e1 @ RTDraggable.
e2 @ RTDraggable.
e1 @ RTHighlightable.
@philippeback
philippeback / ColoredGrid.st
Created February 10, 2018 21:57
Colored Roassal Grid
ratio := #( 10 by 4 ).
width := ratio at: 3.
height := ratio at: 1.
totalWidth := 20.
totalHeight := 30.
v := RTView new.
elements := OrderedCollection new.
@philippeback
philippeback / RoassalGrid.st
Created February 10, 2018 21:08
Little Roassal Grid
| v elementslayout |
v := RTView new.
elements := (RTBox new size: 20) elementsOn: (1 to: 20 * 30).
elements withIndexDo: [ :element :index | (index > (15 * 20)) ifTrue: [element color: TRTheme current green]].
v addAll: elements.
layout := RTGridLayout on: elements withGap: 1 withLineItemsCount: [ 20 ].
v
canvas focusOnCenterScaled;
signalUpdate.
@philippeback
philippeback / RTClick.st
Created February 10, 2018 20:12
Clickable Roassal Element
v := RTView new.
e := RTBox new element.
v add: e.
e when: TRMouseClick do: [ :evt |
e color: Color random.
v signalUpdate ].
v
@philippeback
philippeback / installglances.sh
Created January 24, 2018 10:35
Install glances using Pip and Anaconda2
source /opt/anaconda2/bin/activate
export {http,https,ftp}_proxy=webproxy.xxx.tla:8080
pip install glances
yarn jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient-tests.jar TestDFSIO -write -nrFiles 200 -fileSize 50G
ToolRegistry new openRecentChangesLog
@philippeback
philippeback / IcebergBabun.st
Created November 28, 2017 21:00
IcebergWindowsBabun
babunSshDir := FileLocator C / 'Users' / 'phil' / '.babun' / 'cygwin' / 'home' / 'phil' / '.ssh'.
IceCredentialsProvider useCustomSsh: true.
IceCredentialsProvider sshCredentials
publicKey: (babunSshDir / 'id_rsa.pub') pathString;
privateKey: (babunSshDir / 'id_rsa') pathString.
https://pharoweekly.wordpress.com/2015/11/06/quickaccess/
I quickly wrote yet another small tool to work faster with Pharo. I call it
"QuickAccess" - it's some kind of "ScriptManager 2.0" allowing you
to quickly access actions (defined as code scripts) via Spotter, Menu, Button, etc.
You can load it from Spotter/Catalog in Pharo 5.0 beta.
The following video demonstrates how to use it: