Skip to content

Instantly share code, notes, and snippets.

Giovanni Cappellotto potomak

Block or report user

Report or block potomak

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
@potomak
potomak / example.go
Created Apr 11, 2018
Go interface example
View example.go
// Run at https://play.golang.org/p/gYCGtWOHGci
package main
import (
"fmt"
)
// Define an interface
type Foo interface {
@potomak
potomak / Rinkeby.md
Created Aug 11, 2017 — forked from cryptogoth/Rinkeby.md
How to get on Rinkeby Testnet in less than 10 minutes
View Rinkeby.md

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

View eth address rinkeby
0x95BcA9Cf2C4984978D658bDc1aA22cf447Cdb33f
View scotty-format-example.hs
main :: IO ()
main = scotty 8080 $ do
get "/hello" $ do
let content = "Hello world!"
respondTo $ do
formatJson $
json $ object ["content" .= content]
formatText $
text content
format "application/vnd.chess-pgn" $ do
@potomak
potomak / airbrake_fetcher.rb
Last active Jun 12, 2016
Collect and show Airbrake errors metrics with Ruby
View airbrake_fetcher.rb
require 'json'
require 'open-uri'
class AirbrakeFetcher
BASE_URL = 'https://airbrake.io'
DEFAULT_LIMIT = 100
def initialize(api_key, project_id)
@api_key = api_key
@project_id = project_id
@potomak
potomak / README.md
Last active Mar 20, 2016
Profiling a Haskell executable memory usage
View README.md

Profiling a Haskell executable memory usage

To generate a heap profile from your program:

  1. Compile the program for profiling.
  2. Run it with one of the heap profiling options (eg. -h for a basic producer profile). This generates the file prog.hp.
  3. Run hp2ps to produce a Postscript file, prog.ps.

Notes about the compilation for profiling

@potomak
potomak / 01.markdown
Last active Aug 29, 2015
gist-txt @ Manhattan.js
View 01.markdown
state
next prev
02
index

What is gist-txt?

gist-txt is an adventure game engine

View hello-world.txt
Hello World!Foo
Bar
View index.markdown
You can’t perform that action at this time.