This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
From https://stackoverflow.com/questions/12046786/jackson-json-custom-serialization-for-certain-fields | |
http://www.mkyong.com/java/jackson-streaming-api-to-read-and-write-json/ | |
*/ | |
//Field Serialization | |
public class Person { | |
public String name; | |
public int age; | |
@JsonSerialize(using = IntToStringSerializer.class, as=String.class) | |
public int favoriteNumber: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//From http://stackoverflow.com/questions/1986896/what-is-the-difference-between-call-and-apply | |
/*The main difference is that apply lets you invoke the function with arguments as an array; | |
call requires the parameters be listed explicitly. | |
See here and here. | |
Pseudo syntax: theFunction.apply(valueForThis, arrayOfArgs) | |
theFunction.call(valueForThis, arg1, arg2, ...) | |
Sample code: */ | |
function theFunction(name, profession) { | |
alert("My name is " + name + " and I am a " + profession + "."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS ( SELECT * FROM information_schema.columns WHERE table_name = 'country' AND column_name = 'created_at' AND table_schema = DATABASE() ) THEN | |
ALTER TABLE `country` DROP COLUMN `created_at`; | |
END IF; | |
Because DROP COLUMN IF EXISTS isn't supported by MySQL. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SSL ignore | |
set GIT_SSL_NO_VERIFY=true | |
##LOG | |
# Difference de commit entre deux branch | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative master..branch-X | |
git log --graph --pretty=format:"%Cred%h%Creset - %C(cyan)%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset" --abbrev-commit --date=relative --since="2 day ago" | |
##RESET | |
#Annule les commits après H-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Objects; | |
public class Address { | |
... | |
@Override | |
public boolean equals(Object obj) { | |
if (obj == null) return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"After Each", | |
"trigger":"Jaft", | |
"usage":"Jaft", | |
"inline":true, | |
"description":"Jasmine After Each", | |
"template":"afterEach (function(){\n$${body}\n{\n" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canMutationObserver=typeof window!=="undefined"&&window.MutationObserver;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div");var observer=new MutationObserver(function(){var queueList=queue.slice();que |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://artillery.io/docs/cli-reference/ | |
set DEBUG=http* | artillery run -k --target host -o h:\result.json scripts && artillery report h:\result.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
autonumber | |
title __Cluster of application__ OpenID flow | |
box "Frontend" #Violet | |
participant User1 | |
end box | |
box "Application 1" #LightBlue | |
participant LoadBalancer | |
participant Node1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/.idea/ | |
/.classpath | |
/.project | |
/.settings/ | |
*.iml | |
/dependency-reduced-pom.xml | |
/target/ |
OlderNewer