Skip to content

Instantly share code, notes, and snippets.

View Promichel's full-sized avatar

Patrick Trautmann Promichel

View GitHub Profile
@Promichel
Promichel / core.less
Created May 3, 2012 13:21
Core Less Sample
/* Button Colors */
@btnNormal: #679FD2;
@btnSuccess: #4EA429;
@btnWarn: #FF7400;
@btnError: #BF3030;
@greyscale: #CCC;
body {
font-family: 'PT Sans Narrow', sans-serif;
@Promichel
Promichel / Book.java
Created January 30, 2012 19:29
So gehts bei mir
package de.promichel.beans;
/**
* Created by Patrick Trautmann
* <p/>
* Contact: patrick.trautmann@gmail.com
* Date: 30.01.12
* Time: 20:09
*/
public class Book {
package de.jsftutorial;
import javax.faces.bean.ManagedBean;
/**
* Created by Patrick Trautmann
* <p/>
* Contact: patrick.trautmann@gmail.com
* Date: 13.01.12
* Time: 18:57
@Promichel
Promichel / memory.cs
Created December 30, 2011 11:11
Memory Editing class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.InteropServices;
public unsafe class ProcessMemory
{
[DllImport("Kernel32.dll")]
@Promichel
Promichel / Repository.java
Created November 25, 2011 21:43
Spring JPA Example
package de.sharea.svnpad.dao.entities;
import javax.persistence.*;
@Entity
public class Repository {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
@Promichel
Promichel / applicationContext.xml
Created November 17, 2011 11:13
Spring Property Reader
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:project.properties</value>
</property>
</bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${jdbc.driver}</value>
</property>
@Promichel
Promichel / Account.java
Created November 16, 2011 19:36
Mongo with Spring
public class Account {
public enum Type {
SAVINGS, CHECKING
}
private String id;
private String accountNumber;
@Promichel
Promichel / Aggregatfunktionen.sql
Created November 14, 2011 12:38
Oracle Abfragen
-- 2. Aggregatfunktionen
-- 1)
SELECT MIN(e.salary),
MAX(e.salary)
FROM employees e
-- 2)
SELECT AVG(e.salary),
SUM(e.salary)
@Promichel
Promichel / applicationContext-security.xml
Created November 9, 2011 13:48
Spring Security 3.1 with LDAP Auth Provider
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<global-method-security secured-annotations="enabled" jsr250-annotations="enabled"/>