Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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
@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 / Package Control.sublime-settings
Last active August 29, 2015 14:13
package-sublime-config
/**
* Created with gist plugin
*/
{
"auto_upgrade_last_run": null,
"in_process_packages":
[
],
"installed_dependencies":
[
@rsvalerio
rsvalerio / .editorconfig
Created February 11, 2015 23:00
editor config
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*.java]
indent_style = space
indent_size = 4
@rsvalerio
rsvalerio / main.yml
Created April 18, 2015 01:10
ansible Java 1.7 openjdk
---
- name: Install Java 1.7
yum: name=java-1.7.0-openjdk state=present
@rsvalerio
rsvalerio / pom.xml
Last active August 29, 2015 14:20
maven quality report config example
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pmenos.ecommerce</groupId>
<artifactId>exportacao</artifactId>
<name>exportacao_ecommerce</name>
<packaging>jar</packaging>
@rsvalerio
rsvalerio / ansible-galaxy-local
Created August 19, 2015 03:45
Shortcut to run playbooks wihtout the need of -i 'localhost,'
#!/bin/bash
ansible-playbook "$1" -i 'localhost,'