Skip to content

Instantly share code, notes, and snippets.

View yrashk's full-sized avatar
🎯
Being productive

Yurii Rashkovskii yrashk

🎯
Being productive
View GitHub Profile
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Compiling pumpkindb v0.2.0 (file:///Users/yrashk/Code/eventsourcing/pumpkindb)
warning: you should put `PumpkinScript` between ticks in the documentation
--> src/script/mod.rs:9:5
|
9 | //! PumpkinScript is a minimalistic concatenative, stack-based language inspired
| ^^^^^^^^^^^^^
|
= note: #[warn(doc_markdown)] on by default
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#doc_markdown
(Finds the last element in an ordered collection: )
[2DUP CONCAT SWAP DROP CURSOR DUP ROT CURSOR/SEEK? [DUP CURSOR/CUR UNWRAP DROP ROT DUP LENGTH SWAP ROT ROT 0 SWAP SLICE EQUAL? [CURSOR/CUR] [CURSOR/PREV] IFELSE ] [CURSOR/LAST SWAP DROP] IFELSE UNWRAP SWAP DROP] 'ORDCOLL/LAST DEF
+-----------------------------+
| |
| |
| |
+---------------^+ +---------+
| read | Land of purity | write |
| | | |
| | | |
| | | |
| +-----------------------------+ |
@yrashk
yrashk / es4j.md
Last active October 30, 2016 04:53
@yrashk
yrashk / User.java
Last active April 12, 2016 23:46
Pseudocode-ish User's email retrieval
// Pseudocode-ish User's email retrieval
public class User {
public String email() {
return query(equal(EmailChanged.ID, id),
descending(EmailChanged.TIMESTAMP)).first().
email();
}
}
@yrashk
yrashk / gist:bc9e2d3a0c6c0c33bebc18113eb3b282
Created April 3, 2016 16:46 — forked from knu/gist:111055
How to mass-rename tags and push them with Git
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done
@yrashk
yrashk / OFFER.md
Last active October 1, 2015 05:46
We will document, design and produce API bindings for all popular languages

Implementable

API Accessibility Program

TL;DR: We will document, design and produce API bindings for all popular languages.


Somebody once said, "good APIs are like good jokes — you don't need to explain them."

Verifying that +yrashk is my Bitcoin username. You can send me #bitcoin here: https://onename.io/yrashk
func TestErr(t *testing.T) {
passed := false
handled := false
err.Handle("this kind of failure", func(e error) {
handled = true
}).
Handle("that kind of failure", func(e error) {
}).
Run(func(h err.H) {
v := h(err.Ignore)(exampleFunction())
$ ./gitchain Info | json_pp
{
"Mining" : {
"Miners" : {
"954aba53482f0a27f33953d83cb08e629facc4c836c3bb7daa54b42bc52689ac" : {
"StartTime" : "2014-05-15T10:30:29.189687628+08:00"
},
"557ca23e1ce37303c71797829096d0a42bb5b07bc2751f76d0d61da37e00a7c4" : {
"StartTime" : "2014-05-15T10:30:27.59290694+08:00"
},