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 / 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 / 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 / Jenkinsfile
Created October 30, 2020 10:24 — forked from ajax13/Jenkinsfile
Jenkins file for symfony pipeline project written in groovy
repositoryUrl = "https://github.com/xxx/yyy.git"
branch = "zzz"
pipeline {
agent any
stages {
stage('Clone sources') {
steps {
git url: repositoryUrl, credentialsId: "git-credentials", branch: branch
@Rubentxu
Rubentxu / kubernetes_add_service_account_kubeconfig.sh
Created July 30, 2020 08:27 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@Rubentxu
Rubentxu / reactive_systems_bibliography.md
Created October 28, 2017 06:26 — forked from brendanzab/reactive_systems_bibliography.md
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@Rubentxu
Rubentxu / gist:d8557b7f7803e378b3e3bf063b19659c
Created March 12, 2019 10:27 — forked from mikluko/gist:3897117
Basic monit config to monitor CPU, memory and disk usage
set daemon 30 with start delay 60
set logfile syslog facility log_daemon
set httpd port 2812
allow localhost
set mailserver localhost
set alert alert@example.com but not on { instance }
mail-format {
From: noreply@example.com
@Rubentxu
Rubentxu / GagSsl.java
Created October 31, 2018 12:59 — forked from mefarazath/GagSsl.java
Get OkHttpClient which ignores all SSL errors.
private static OkHttpClient getUnsafeOkHttpClient() {
try {
// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
String authType) throws CertificateException {
}
@Rubentxu
Rubentxu / Dockerfile
Created October 25, 2018 11:38 — forked from jayarampradhan/Dockerfile
MongoDB Docker Container (Centos 7, Mongo DB 3.x)
# Dockerizing MongoDB: 3.1 Dockerfile for building MongoDB 3.1 images
# Based on centos:centos7, installs MongoDB
FROM centos:centos7
MAINTAINER Jayaram Pradhan <jayaram.pradhan@uimirror.com>
# Set up mongodb yum repo entry
# https://www.liquidweb.com/kb/how-to-install-mongodb-on-centos-6/
RUN echo -e "\
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": null,
"links": [],
@Rubentxu
Rubentxu / README.md
Created July 2, 2018 13:25 — forked from CodingDoug/README.md
Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

If you're trying to do this, you came to the right place!

Watch this code work in real time: https://twitter.com/CodingDoug/status/945035556555186176

Setup

These instructions assume that you already have a Firebase project, and billing is enabled. Billing is required to use the Vision API.