Skip to content

Instantly share code, notes, and snippets.

View andrea-sdl's full-sized avatar

Andrea Grassi andrea-sdl

  • Montevarchi (Italy)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am andrea-sdl on github.
  • I am andrea_sdl (https://keybase.io/andrea_sdl) on keybase.
  • I have a public key ASB6n4BDOgapUJ43aREbxVpFfAXeJC3UbAkq341Qt0-qdwo

To claim this, I am signing this object:

@andrea-sdl
andrea-sdl / springfox.js
Created December 7, 2017 11:33
Add support for overriding swagger-ui.html in Springfox.js
$(function() {
var baseUrl;
var springfox = {
"getBaseUrl": function() {
if (baseUrl === undefined) {
var urlMatches = /(.*)\/swagger-ui.html.*/.exec(window.location.href);
baseUrl = urlMatches[1];
}
return baseUrl;
},
@andrea-sdl
andrea-sdl / ParameterTypeReader.java
Created November 23, 2017 13:23
ParameterTypeReader fix for RequestBody ModelAttribute springfox issue
/*
*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@andrea-sdl
andrea-sdl / disable-scrolling-wc-tabs.js
Created November 8, 2016 05:52
disable scrolling on woocommerce-tabs
jQuery(".woocommerce-tabs li a").off("click");
jQuery(".woocommerce-tabs li a").click(function(e){
e.preventDefault();
jQuery(".woocommerce-tabs li").removeClass("active");
jQuery(this).parent().addClass("active");
jQuery(".woocommerce-Tabs-panel:visible").hide();
jQuery(".woocommerce-Tabs-panel:visible").hide();
jQuery(jQuery(this).attr("href")).show();
return false;})
@andrea-sdl
andrea-sdl / ffpc.conf
Last active April 20, 2016 05:14
NGINX Wordpress+Memcached Integration Config
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
@andrea-sdl
andrea-sdl / pg_backup.config
Created December 9, 2015 13:02
Linux Scripts to automate PostgreSQL Backup (with database exclusion)
##############################
## POSTGRESQL BACKUP CONFIG ##
##############################
# Optional system user to run backups as. If the user the script is running as doesn't match this
# the script terminates. Leave blank to skip check.
BACKUP_USER=
# Optional hostname to adhere to pg_hba policies. Will default to "localhost" if none specified.
HOSTNAME=