Skip to content

Instantly share code, notes, and snippets.

View ivan-moto's full-sized avatar

Ivan Moto ivan-moto

View GitHub Profile
@rowanmanning
rowanmanning / README.md
Last active April 17, 2025 05:46
Writing a Friendly README. This a companion-gist to the post: http://rowanmanning.com/posts/writing-a-friendly-readme/
@danhyun
danhyun / Reader.java
Last active May 27, 2024 17:38
`Reader` and `TryReader` monads as demonstrated by Mario Fusco (@mariofusco) Devoxx 2015
public class Reader<R, A> {
private final Function<R, A> run;
public Reader(Function<R, A> run) { this.run = run; }
public <B> Reader<R, B> map(Function<A, B> f) {
return new Reader<>( r -> f.apply((apply(r))) );
}
public <B> Reader<R, B> flatMap(Function<A, Reader<R, B>> f) {
@jonikarppinen
jonikarppinen / CustomObjectMapper.java
Last active June 28, 2018 21:28
Example of making Jackson behave more sensibly by default (also, more like Gson)
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
/**
* ObjectMapper customised for my tastes and most typical needs
*
* @author Joni Karppinen
*/
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 6, 2025 00:00
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@isaacs
isaacs / comma-first-var.js
Created April 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",