Skip to content

Instantly share code, notes, and snippets.

View Rubentxu's full-sized avatar
💭
Solo se que no se nada

Ruben Dario Rubentxu

💭
Solo se que no se nada
View GitHub Profile
@Rubentxu
Rubentxu / build.gradle
Created January 27, 2016 15:19 — forked from lyhcode/build.gradle
Gradle + Jetty + AJP (Ajp13SocketConnector)
apply plugin: 'jetty'
apply plugin: 'java'
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
providedRuntime 'org.mortbay.jetty:jetty-ajp:6.1.26'
@Rubentxu
Rubentxu / CMakeLists.txt
Created January 25, 2016 09:12 — forked from FlorianWolters/CMakeLists.txt
Adding Boost as a Dependency with CMake
# COPYRIGHT (C) Florian Wolters 2014
#
# Author: Florian Wolters <[email protected]>
cmake_minimum_required (VERSION 2.8.12.2 FATAL_ERROR)
# Set options for this project.
set (PROJECT_NAME "hello_boost_with_cmake" CXX)
project (${PROJECT_NAME})
set (PROJECT_SOURCE_DECLARATION_DIRECTORY ${PROJECT_SOURCE_DIR}/include)
@Rubentxu
Rubentxu / variant.cc
Created January 17, 2016 14:32 — forked from tibordp/variant.cc
A simple variant type implementation in C++
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <string>
template <size_t arg1, size_t ... others>
struct static_max;
template <size_t arg>
@Rubentxu
Rubentxu / maybe.go
Created September 24, 2015 23:34
Implementing the Maybe monad in Golang
package main
import (
"fmt"
"errors"
)
type Maybe interface {
Return(value interface{}) Maybe
Bind(func(interface{}) Maybe) Maybe
package main
import (
"fmt"
"reflect"
)
//function types
type mapf func(interface{}) interface{}
@Rubentxu
Rubentxu / build(transitive-dependency).gradle
Last active August 29, 2015 14:27 — forked from michail-nikolaev/build.gradle
Gradle - force transitive dependency version for some group
apply plugin: 'java'
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
//specifying a fixed version for all libraries with 'org.gradle' group
if (details.requested.group == 'org.springframework') {
details.useVersion "$springVersion"
}
}
@Rubentxu
Rubentxu / build.gradle
Last active August 29, 2015 14:20 — forked from mekya/build.gradle
//Export War file from Eclipse Web Project with Gradle
// we need to use war plugin
apply plugin: 'war'
//default webAppDirName in gradle is not "WebContent" but
// it is default in eclise so change it according to eclipse layout
// it encapsulates all files under webAppDirName
webAppDirName = 'WebContent'