Skip to content

Instantly share code, notes, and snippets.

@rafasf
rafasf / HttpConfiguration.java
Last active November 5, 2020 03:12
Kotlin Consumer Function Behaviour
// HttpClientConfiguration.java
package com.example.demo;
import java.util.function.Consumer;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.reactive.ReactorResourceFactory;
@rafasf
rafasf / keybase.md
Last active December 22, 2017 03:26

Keybase proofI hereby claim:

  • I am rafasf on github.
  • I am rafasf (https://keybase.io/rafasf) on keybase.
  • I have a public key ASA19pwmamVp7tzu01C8xhn2_iP5UcRXmGOulIbn0-nzOwo

To claim this, I am signing this object:

{  "body":{    "key":{      "eldest_kid":"01200fd1b656916ce3b00a885fc8e37032dc460f6f94c85e32479efa07fa5fa7320b0a",      "host":"keybase.io",      "kid":"012035f69c266a6569eedceed350bcc619f6fe23f951c4579863ae9486e7d3e9f33b0a",      "uid":"78a5568e07272ef1667513a322581500",      "username":"rafasf"    },    "merkle_root":{      "ctime":1513912737,      "hash":"f9a56609c68283b873b62d7f327e98f4c13294afb38534ff4ab099e7b68d52a37a0faac695eb71e0de5d51f2e9766bf98d6b482c0361c32c3bd75b8dbbefc0fc",      "hash_meta":"5aae4d89573c50211311206b55a79cdfec20123ec3d6c23d7e5acfec4488382a",      "seqno":1848169    },    "service":{      "name":"github",      "username":"rafasf"    },    "type":"web_service_binding",    "version":1  },  "client":{    "name":"keybase.io go client",    "version":"1.0.
@rafasf
rafasf / mc.rb
Created February 10, 2017 13:51
Mountain Collective Flights
#!/usr/bin/env ruby
require 'json'
resorts_source = 'resorts.json'
origins = ['JFK', 'EWR', 'LGA']
depart_date = '2017-02-23'
return_date = '2017-02-26'
@rafasf
rafasf / bootstrap-java-project.sh
Last active August 29, 2015 14:26
Bootstrap Java Project with Gradle
#!/usr/bin/env bash
set -e
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__gradle="gradle-2.5"
__gradle_file="${__gradle}-bin.zip"
download_gradle() {
curl -O "https://downloads.gradle.org/distributions/${__gradle_file}"
@rafasf
rafasf / index.html
Created June 14, 2014 20:30
simple-pagination
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Pagination playground</title>
<link rel="stylesheet/less" type="text/css" href="pagination.less" />
<script type="text/javascript" src="less.min.js"></script>
</head>
<body>
<section class="pagination">
@rafasf
rafasf / sharing.html
Created June 6, 2012 18:04
Sharing a link/image
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>slideshow</title>
<script src="http://platform.tumblr.com/v1/share.js" type="text/javascript"></script>
</head>
<body>
<h3 id="url"></h3>
<div id="twitter">