Skip to content

Instantly share code, notes, and snippets.

View gmarziou's full-sized avatar

Gaël Marziou gmarziou

View GitHub Profile
@gmarziou
gmarziou / Vagrantfile
Created December 12, 2018 13:42 — forked from tknerr/Vagrantfile
Sample Vagrantfile that works with all providers (virtualbox, aws, managed) and in combination with the vagrant-omnibus plugin
#
# Vagrantfile for testing
#
Vagrant::configure("2") do |config|
# the Chef version to use
config.omnibus.chef_version = "11.4.4"
def configure_vbox_provider(config, name, ip, memory = 384)
config.vm.provider :virtualbox do |vbox, override|
@gmarziou
gmarziou / inventory2json.py
Created September 24, 2018 11:40 — forked from sivel/inventory2json.py
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
#!/usr/bin/env python
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
@gmarziou
gmarziou / jhipster-custom-code.md
Last active July 31, 2018 11:30
Managing custom code in JHipster using git

This is just an example which is not complete but gives some hints how to re-generate code while keeping your custom changes.

To simplify, custom development is committed directly on git master branch.

Generate the app with JHipster 4.13.3

yarn global add [email protected]
mkdir keep-changes
cd keep-changes
@gmarziou
gmarziou / TokenGeneratorCLI.java
Last active September 13, 2017 22:13
Size of JHipster JWT
package io.github.jhipster.security.jwt;
import io.jsonwebtoken.CompressionCodecs;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.apache.commons.lang3.RandomStringUtils;
import java.util.Date;
public class TokenGeneratorCLI {
@gmarziou
gmarziou / jdom2_transform.groovy
Last active December 1, 2016 18:35 — forked from akhikhl/jdom2_transform.groovy
XML transformation with Groovy, JDOM2 and XPath
/*
* Copyright 2013 (c) Andrey Hihlovskiy
* License: MIT (http://opensource.org/licenses/MIT)
*/
@Grab('org.jdom:jdom2:2.0.6')
@Grab('jaxen:jaxen:1.1.6')
@GrabExclude('jdom:jdom')
import org.jdom2.*
@gmarziou
gmarziou / README.md
Last active August 29, 2015 14:14 — forked from hilios/README.md

$pageTitle

Allows to control the page title from the AngularJS route system, controllers or any other component through an injectable service.

ngPageTitle - Page title service (run tests)

To get started add the module to your app and configure the page title provider: