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
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'
@Rubentxu
Rubentxu / broadcasting.go
Last active August 29, 2015 14:27
Broadcasting values in Go with linked channels
package main
import (
"fmt";
"time";
)
type broadcast struct {
c chan broadcast;
@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"
}
}
package main
import (
"fmt"
"reflect"
)
//function types
type mapf func(interface{}) interface{}
@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
@Rubentxu
Rubentxu / renderTemplate.js
Created December 2, 2015 16:08
/* * Funcion render Template. * El codigo en javascript debe estar envuelto entre #{ codigo.. }# * El modelo de datos debe estar envuelto entre #{= data.loquesea }# * La parte html va sin restrinciones. * a la funcion renderTmpl le pasamos la variable contenedora de la plantilla y el modelo de datos a usar en la plantilla. * La plantilla debe es…
/*
* Funcion render Template.
* El codigo en javascript debe estar envuelto entre #{ codigo.. }#
* El modelo de datos debe estar envuelto entre #{= data.loquesea }#
* La parte html va sin restrinciones.
* a la funcion renderTmpl le pasamos la variable contenedora de la plantilla y el modelo de datos a usar en la plantilla.
* La plantilla debe estar un comentario multilinea dentro de una funcion.
* -- rdcabrera --
*/
@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 / 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 <wolters.fl@gmail.com>
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 / 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 / cpp-install_instructions.md
Created February 13, 2016 12:18 — forked from FlorianWolters/cpp-install_instructions.md
Installation instructions for the C++ ecosystem

Installation instructions for the C++ ecosystem

This document contains installation instructions for some C++ tools and libraries. It uses the cross-platform build system [CMake][0] whenever the software to download, build, configure (and run) supports it.

By default the process is described for a *-nix operating system (OS).

The process described here works very good, if the installed software is added to the path. It is suggested to do this, by adding the following lines to the /etc/profile.local file: