Skip to content

Instantly share code, notes, and snippets.

View ppazos's full-sized avatar
🌎
All around

Pablo Pazos Gutiérrez ppazos

🌎
All around
View GitHub Profile
@virasak
virasak / SQLiteDialect.java
Created January 29, 2009 07:26
SQLite dialect for Hibernate
/*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*
*/
package org.hibernate.dialect;
@ishikawa
ishikawa / gist:88599
Created April 1, 2009 07:49
Java Sample Code for Calculating HMAC-SHA1 Signatures
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ikarius
ikarius / md5.groovy
Created February 9, 2010 09:57
How to generate a MD5 hash in Groovy ...
def generateMD5(String s) {
MessageDigest digest = MessageDigest.getInstance("MD5")
digest.update(s.bytes);
new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0')
}
@rfreedman
rfreedman / spock-integration-grails-controller.groovy
Created May 13, 2011 14:41
Spock Integration Test for Grails Controller Example
class CompoundInstanceControllerIntegrationSpec extends ControllerSpec {
static transactional = true
def "saving a new compound instance and compound"() {
setup:
controller.metaClass.message = {args -> "mockMessage"}
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bobbywarner
bobbywarner / grails-stripe-controller
Created December 29, 2011 20:12
Grails Stripe Example
<!doctype html>
<html>
<head>
<meta name="layout" content="main"/>
<r:require module="application"/>
</head>
<body>
<h3>Confirmation</h3>
<p>${msg}</p>
</body>
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@dexterous
dexterous / GetTalks.groovy
Last active October 1, 2015 13:28
RubyConfIndia -> Lanyrd ETL
@Grab(group='org.ccil.cowan.tagsoup', module='tagsoup', version='1.2.1')
def parser = new XmlSlurper(new org.ccil.cowan.tagsoup.Parser())
/** get all talks and their speakers */
def talksPage = parser.parse('http://rubyconfindia.org/2012/talks.html')
def talks = talksPage.body.
section.find { it.@id == 'page' }.
section.find { it.@id == 'talks' }.
article.
collect { talk(it) }
@dharFr
dharFr / readme.md
Created April 5, 2012 13:59
Grails run-app Helper

Grails run-app Helper

Launch 'grails run-app' with options:

-v | --grails-version  Specify grails version
-r | --remote-host     Run 'grails run-app' with -Dserver.host={your-ip} option
-p | --port            Run 'grails run-app' with -Dserver.port={value}
-h | --help            Display help

Setup