Skip to content

Instantly share code, notes, and snippets.

Esteban A. Maringolo eMaringolo

Block or report user

Report or block eMaringolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:bed9974d70c9ab8c6398149716e22b08
ZnClient subclass: #ZnCachingClient
instanceVariableNames: ''
classVariableNames: ''
package: 'Zinc-HTTP-CachingClient'
"Execute the currently set up request to generate a response.
If the request was performed before, retrieve the cached version.
Return the #contents of the response, if any."
eMaringolo /
Last active Sep 11, 2019
Keybase Identity Proof

Keybase proof

I hereby claim:

  • I am emaringolo on github.
  • I am emaringolo ( on keybase.
  • I have a public key whose fingerprint is A693 D5C7 226E 1254 9132 45E6 AE8F 6B83 81F5 D5AD

To claim this, I am signing this object:

eMaringolo / bitcoin
Created Aug 2, 2017
Ubuntu's /etc/init.d/bitcoin script to run a bitcoin node as daemon/service
View bitcoin
# Provides: bitcoin
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Bitcoin Fullnode
eMaringolo / load-script
Created Apr 28, 2015
IntelliJ icons in Pharo
View load-script
Gofer it
smalltalkhubUser: 'estebanlm' project: 'IconsForPharo';
package: 'Polymorph-Icons-Idea';
ThemeIcons current: IdeaUIThemeIcons new.
AbstractNautilusUI resetIconCaches.
"(you will need to reopen all your windows)"
"The coolness of this icons set is that they work very fine with Dark Theme too :)"
View JSON Bench
"Compares the parse speed of three different JSON parsers."
{'file1.json'. 'file2.json'. 'file3.json' } do: [ :filename |
jsonString := fileName asFileReference contents.
Transcript cr; show: jsonString size printString, 'bytes JSON:'; cr.
Transcript show: 'NeoJSON: '; show: [ NeoJSONReader fromString: jsonString] bench; cr.
Transcript show: 'JSON: '; show: [Json readFrom: jsonString readStream ] bench; cr.
Transcript show: 'WAJsonParser: '; show: [WAJsonParser parse: jsonString] bench; cr.
eMaringolo /
Created May 30, 2014
Simple example on how to send emails from Pharo using MandrillApp client
"Get client at!/~NorbertHartl/Mandrill"
"Set the api key only once."
MandrillClient apiKey: 'yourApiKeyGoesHere'.
(MandrillMessage new
addRecipient: (MandrillRecipient new email: '');
fromName: 'Bob';
fromEmail: '';
subject: 'Sending mails from Pharo';
eMaringolo /
Created May 24, 2014
8 byte pretty much unique ID generator
| epoch generator ids runLength shardId seqId|
epoch := '01-01-2014' asDateAndTime asUnixTime. "1388545200"
generator := [:seed1 :seed2 |
| id |
id := (DateAndTime now asUnixTime - epoch) bitShift: 64-41.
id := id bitOr: (seed1 bitShift: (64-41-13)).
id := id bitOr: seed2 ].
eMaringolo /
Created Apr 27, 2014
All the layout of some classes is wrong, due to some ancient bug. The bug fix has been integrated but all the classes that have been modified in-between may have this problem. To fix that you have to force the rebuild of these classes (by adding then removing a dummy inst var for ex).
ivName := 'anIVNameImPrettySureNobodyUses'.
all := Smalltalk allClasses flatCollect: [ :e | { e . e class } ].
candidates := all reject: [ :e | e superclass isNil or: [e layout slotScope isKindOf: LayoutEmptyScope ] ].
toRebuild := candidates reject: [ :e | e superclass layout slotScope == e layout slotScope parentScope ].
toRebuild do: [ :e | e addInstVarNamed: ivName ].
toRebuild do: [ :e |
(e isClassSide
mkdir marina
cd marina
wget ",VERSION=development,VM=vm/lastSuccessfulBuild/artifact/"
wget -O- | bash
git clone
cd marina
git submodule init
git submodule update
bower install
cd tide
View Getting started
renderChartOn: html
| graphId graph |
graphId := html nextId.
html div class: 'chart'; id: graphId.
graph := Rickshaw graph element: graphId.
graph width: 300.
graph height: 200.
graph addSerieNamed: 'Demo' color: 'steelblue' elements: { 0 @ 40. 1 @ 49. 2 @ 38. 3 @ 30. 4 @ 32 }.
html document addLoadScript: graph
You can’t perform that action at this time.