Skip to content

Instantly share code, notes, and snippets.

@Configuration
@EnableWebMvcSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public ServiceProperties serviceProperties() {
ServiceProperties serviceProperties = new ServiceProperties();
serviceProperties.setService("https://localhost:8443/cas-sample/j_spring_cas_security_check");
serviceProperties.setSendRenew(false);
return serviceProperties;
@rsvalerio
rsvalerio / saml_cas_problem
Created August 5, 2014 02:04
saml_cas_problem
[DEBUG] org.jasig.cas.client.validation.Saml11TicketValidator - Loading custom parameters from configuration.
[DEBUG] org.jasig.cas.client.validation.Saml11TicketValidator - Constructing validation url: https://srvsionline1.no-ip.org:8443/governa-cas/samlValidate?TARGET=http%3A%2F%2Flocalhost%3A8080%2Fj_spring_cas_security_check
[DEBUG] org.jasig.cas.client.validation.Saml11TicketValidator - Retrieving response from server.
[DEBUG] sun.net.www.protocol.http.HttpURLConnection - sun.net.www.MessageHeader@2004df0510 pairs: {POST /governa-cas/samlValidate?TARGET=http%3A%2F%2Flocalhost%3A8080%2Fj_spring_cas_security_check HTTP/1.1: null}{Content-Type: text/xml}{SOAPAction: http://www.oasis-open.org/committees/security}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.7.0_60}{Host: srvsionline1.no-ip.org:8443}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}{Content-Length: 436}
[DEBUG] sun.net.www.protocol.http.HttpURLConnection - sun.net.www.MessageHeader@1fcdd1af
@rsvalerio
rsvalerio / hateoas.js
Created July 29, 2014 23:23
restangular + spring HATEOAS
$scope.pesquisar = function() {
var orgaosManager = $scope.orgaosManager = {};
orgaosManager.all = Restangular.all('orgaoAtendimento');
// orgaosManager.currentPage = 0;
// orgaosManager.pages = 0;
// orgaosManager.current = {};
// orgaosManager.location = $location;
orgaosManager.pageSize = 5;
@rsvalerio
rsvalerio / tree.txt
Created July 15, 2014 01:21
project tree
.
├── Gruntfile.js
├── README.md
├── bower.json
├── package.json
├── pom.xml
├── spring_loaded
│   └── springloaded-jhipster.jar
├── src
│   ├── main
@rsvalerio
rsvalerio / firebase-strap-select.js
Last active August 29, 2015 14:01
Angular Service to generate Array of Objects to be used in angular-strap select directive
'use strict';
angular.module('MODULE_NAME_HERE')
.factory('FirebaseStrapSelect', function (syncData, $filter, $q) {
return function (fireBasePath){
var
defer = $q.defer(),
buildingTypeSelectObject = [],
@rsvalerio
rsvalerio / gist:10495431
Created April 11, 2014 19:39
Angularjs - length of ng-repeat with filter
ng-repeat="item in newItens = (itensByType[type] | filter:{type:'new'})"
using:
{{newItens.length}}
@rsvalerio
rsvalerio / couchapp.conf.js
Created November 16, 2013 16:29
couchapp.conf.js
'use strict'
var couchapp = require('couchapp'),
path = require('path'),
ddoc = {
_id: '_design/app',
views: {},
lists: {},
shows: {},
fulltext: {},
@rsvalerio
rsvalerio / gist:5616923
Last active December 17, 2015 13:28
gruntfile config replace version number
,
replace: {
app: {
src: ['dist/index.html'],
overwrite: true,
replacements: [{
from: '##build##',
to: 'Version: <%= pkg.version %> Build: <%= grunt.template.today(\'dd/mm/yyyy hh:MM:ss\') %>'
}]
}
@rsvalerio
rsvalerio / bDatepicker
Last active December 17, 2015 11:59 — forked from danbarua/gist:5356062
angularjs bootstrap datepicker
/*
<input b-datepicker="{{dateOptions}}" ng-model="dateObject" >
$scope.dateOptions = {format: 'dd/mm/yyyy'}
*/
angular.module('bDatepicker', []).
directive('bDatepicker', function(){
return {
require: '?ngModel',
restrict: 'A',
@rsvalerio
rsvalerio / gist:5521304
Created May 5, 2013 16:27
couchapp grunt task
grunt.registerTask('deploy', [
'build',
'push'
]);
grunt.registerTask('push', 'push app to couchdb', function () {
var done = this.async();
// require('child_process').exec('couchapp push couchapp.dist.conf.js http://10.16.200.21:5985/cosmos', function (err, stdout) {
require('child_process').exec('node_modules/couchapp/bin.js push couchapp.conf.js http://localhost:5984/ad', function (err, stdout) {
// require('child_process').exec('couchapp push couchapp.conf.js http://172.24.0.19/cosmos', function (err, stdout) {