Skip to content

Instantly share code, notes, and snippets.

View hydra.yaml
---
# Source: hydra/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: release-name-hydra
labels:
app.kubernetes.io/name: hydra
app.kubernetes.io/instance: release-name
app.kubernetes.io/managed-by: Tiller
@ogero
ogero / OPENCV341_Android_compile.MD
Last active Jan 12, 2022
This process explains how to compile shared libs of opencv and contrib modules from sources for Android ABI `abi-armeabi-v7a`
View OPENCV341_Android_compile.MD

Compilation of OpenCV & contrib modules from sources for Android

This process explains how to compile shared libs of opencv and contrib modules from sources for Android ABI abi-armeabi-v7a.

##Requirements

  • Sources for opencv-3.4.1
  • Sources for opencv_contrib-3.4.1
  • CMake 3.11.3
  • mingw-w64 x86_64-7.3.0-posix-seh-rt_v5-rev0
View ExportableGridBehavior.php
<?php
/**
* GridView Export Behavior
* Requirements:
* Yii 1.1.3 or greater
* An explicit rule on the action that exports the csv like: '<controller:\w+>/<action:\w+>' => '<controller>/<action>'
* Usage:
* <pre>
* //(Step 1) Add this behavior to the controller like
@ogero
ogero / HyperVToggle.bat
Created Aug 3, 2017
Toggle Hyper-V util (docker vs avd-haxm)
View HyperVToggle.bat
@echo off
:InputToggle
echo Select hypervisor launch tipe (auto/off):(A/O)
set INPUT=
set /P INPUT=Type input: %=%
If /I "%INPUT%"=="a" goto auto
If /I "%INPUT%"=="o" goto off
echo Incorrect input & goto InputToggle
@ogero
ogero / README.MD
Last active Jan 4, 2019
Install webhook as upstart service
View README.MD

Webhook basic configuration for Bitbucket

Webhook basic configuration for Bitbucket.

Getting Started

These instructions will get you a clean daemonized webhook installation, ready to execute gulp deploy when bitbucket receives a push on a certain branch.

Installing

@ogero
ogero / Analytics.java
Created May 5, 2017
Analytics Android helper singleton
View Analytics.java
import android.app.Application;
import android.os.Handler;
import android.util.Log;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import java.util.HashMap;
import java.util.Iterator;
@ogero
ogero / main.go
Created Mar 31, 2017
Change modified/created times of paths and files of Kodi library based on Movie release date, for correct order display.
View main.go
package main
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
"log"
"fmt"
"os"
"time"
"io/ioutil"
@ogero
ogero / certbot-util.sh
Last active Dec 2, 2018
Let's Encrypt Certbot util script for auto registration and renewal of ssl certs
View certbot-util.sh
#!/bin/bash
# ######################################################################################## #
# LET'S ENCRYPT CERTBOT UTIL SCRIPT FOR AUTO REGISTRATION AND RENEWAL #
# AUTHOR: GERÓNIMO OÑATIVIA <geronimox@gmail.com> #
# VERSION: 1.0.0 #
# REQUIREMENTS:
# - CERTBOT (https://certbot.eff.org/) #
# ######################################################################################## #
View Joda-patternForStyle.txt
Locale: es_US === Style: SS === Pattern: M/d/yy h:mm a === Result: 1/31/17 12:55 AM
Locale: es_US === Style: MM === Pattern: MMM d, y h:mm:ss a === Result: ene 31, 2017 12:55:51 AM
Locale: es_US === Style: LL === Pattern: d 'de' MMMM 'de' y h:mm:ss a z === Result: 31 de enero de 2017 12:55:51 AM GMT-03:00
Locale: es_US === Style: FF === Pattern: EEEE, d 'de' MMMM 'de' y h:mm:ss a zzzz === Result: martes, 31 de enero de 2017 12:55:51 AM Hora estándar de Argentina
Locale: es_AR === Style: SS === Pattern: dd/MM/yy HH:mm === Result: 31/01/17 00:55
Locale: es_AR === Style: MM === Pattern: dd/MM/y HH:mm:ss === Result: 31/01/2017 00:55:51
Locale: es_AR === Style: LL === Pattern: d 'de' MMMM 'de' y H:mm:ss z === Result: 31 de enero de 2017 0:55:51 ART
Locale: es_AR === Style: FF === Pattern: EEEE, d 'de' MMMM 'de' y HH'h'''mm:ss zzzz === Result: martes, 31 de enero d
@ogero
ogero / expand_disk.py
Created Jan 18, 2017
Python script to expand VirtualBox VMDK disk (created to expand vagrant boxes using VB provider)
View expand_disk.py
import subprocess,re,os,random,string,sys,fileinput
from sys import platform as _platform
from time import sleep
# VirtualBox disk resize tool
# Author: Geronimo Onativia (geronimox@gmail.com)
# Some ideas taken from
# https://github.com/mitchellh/vagrant/issues/2339#issuecomment-230839878
# http://stackoverflow.com/a/31177761/13116