Skip to content

Instantly share code, notes, and snippets.

View juandbc's full-sized avatar

Juan David Bermudez Celedon juandbc

View GitHub Profile
#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@juandbc
juandbc / persistence.xml
Created July 30, 2017 18:14 — forked from jesuino/persistence.xml
Wildfly Datasource and JPA Descriptor (persistence.xml)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="primary">
<jta-data-source>java:jboss/datasources/PeopleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.transaction.flush_before_completion" value="true"/>
</properties>
</persistence-unit>
@juandbc
juandbc / wildfly_httpcache.md
Last active July 26, 2017 05:18 — forked from remibantos/wildfly_httpcache.md
Wildfly 8 - HTTP cache headers tuning for rich client web application

Introduction

This Gist describes how to tune HTTP browser cache expiration for static contents served by Wildfly Undertow web server, as per RFC-2616 section 13.

Wildfly configuration

Description

In order to change HTTP browser cache behavior, a "Cache-Control" HTTP header has to be added to static content HTTP responses returned by Undertow.

Undertow subsystem configuration (standalone.xml)