Skip to content

Instantly share code, notes, and snippets.

curl "http://localhost:9200/mkyong/books/_search?pretty=true"
Spring to JAX-RS Cheat Sheet
This is not an exhaustive list, but it does include the most common annotations.
Spring Annotation JAX-RS Annotation
@RequestMapping(path = "/troopers" @Path("/troopers")
@RequestMapping(method = RequestMethod.POST) @POST
@RequestMapping(method = RequestMethod.GET) @GET
@RequestMapping(method = RequestMethod.DELETE) @DELETE
@ResponseBody N/A
@RequestBody N/A
@podisto
podisto / app.component.ts
Created May 4, 2018 10:39 — forked from nrobinaubertin/app.component.ts
Exemple of ngb-date-parser-formatter implementation (ng-bootstrap)
import { NgbDatepickerConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateFRParserFormatter } from "./ngb-date-fr-parser-formatter"
@Component({
providers: [{provide: NgbDateParserFormatter, useClass: NgbDateFRParserFormatter}]
})
export class AppComponent {}
@podisto
podisto / ussd1.txt
Created July 20, 2017 14:55
Created via API
Send USSD test sur Github test USSD.
@podisto
podisto / ussd1.txt
Created July 20, 2017 14:39
Created via API
Send USSD test sur Github test USSD.
<html>
<head>
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="height: 400px; width: 500px;">
</div>
<script type="text/javascript">
version=1.010
echo "\n* Downloading version $version of source code pro font"
rm -f SourceCodePro_FontsOnly-$version.zip
rm -rf SourceCodePro_FontsOnly-$version
wget https://github.com/downloads/adobe/source-code-pro/SourceCodePro_FontsOnly-$version.zip
echo "\n* Unziping package"
unzip SourceCodePro_FontsOnly-$version.zip
@podisto
podisto / tmux.conf
Created July 12, 2016 09:21
Placer ce fichier dans home
# R, recharge la configuration
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# tmux attach ouvre une session si aucune session trouvée
new-session -n $HOST
# use vim key bindings
setw -g mode-keys vi
# Numéro de fenêtre commence par 1 au lieu de 0
@podisto
podisto / 1-Readme.md
Created May 1, 2016 02:04 — forked from FlYos/1-Readme.md
Redirection user by roles after login/logout in symfony2

Description of this Gist

This is the how to for redirection implementation by roles after login or logout in Symfony2

Step

  1. Copy AfterLoginRedirection.php and AfterLogoutRedirection.php to your bundle under the "Redirection" directory
  2. Edit your services.yml file in your bundle and copy/paste the content of services.yml
  3. Edit your security.yml file...
  4. ... add success_handler: redirect.after.login in form_login: section
  5. ... add success_handler: redirect.after.logout in logout: section
@podisto
podisto / gulpfile.js
Created April 12, 2016 14:13 — forked from sanderhahn/gulpfile.js
Minify and templateCache your Angular Templates using Gulp
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var templates = require('gulp-angular-templatecache');
var minifyHTML = require('gulp-minify-html');
// Minify and templateCache your Angular Templates
// Add a 'templates' module dependency to your app:
// var app = angular.module('appname', [ ... , 'templates']);