Skip to content

Instantly share code, notes, and snippets.


Vladimir Grichina vgrichina

View GitHub Profile
vgrichina /
Created Nov 3, 2009
Improved MSSQL dialect for Hibernate (using more appropriate data types)
* Copyright © 2009, Componentix. All rights reserved.
package com.componentix.hibernate.dialect;
import java.sql.Types;
* A proper dialect for Microsoft SQL Server 2000 and 2005.
vgrichina /
Created Dec 23, 2009
Interactive merge utility for Git, as described here
# git-interactive-merge
# Taken from:
if [[ ( -z $from ) || ( -z $to ) ]]; then
echo "Usage:"
echo " git-interactive-merge <from-branch> <to-branch>"
exit 1
vgrichina / grails
Created Feb 13, 2010
Script to launch appropriate Grails version for current application
View grails
# Check if GRAILS_PREFIX is set
if [ -z $GRAILS_PREFIX ]; then
echo "You must define environment variable GRAILS_PREFIX before running Automatic Grails Version Selector"
exit 1
# Define script params array
declare -a PARAMS
vgrichina / RunScript.groovy
Created Jun 2, 2010
GAnt script used to execute Groovy script inside of Grails context
View RunScript.groovy
import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU
import org.springframework.orm.hibernate3.SessionFactoryUtils
import org.springframework.orm.hibernate3.SessionHolder
includeTargets << grailsScript("_GrailsBootstrap")
includeTargets << grailsScript("_GrailsRun")
includeTargets << grailsScript("_GrailsSettings")
includeTargets << grailsScript("_GrailsClean")
View array.c
// array.h - CKit
// (c) 2009 TJ Holowaychuk <> (MIT Licensed)
#ifndef __CKIT_ARRAY__
#define __CKIT_ARRAY__
View twitter-entities.js
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
* See the documentation here:
* Basically, add ?include_entities=true to your timeline call
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
View cucumber_is_the_best
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Scenario: Add two numbers
Given I visit the calculator page
And I fill in '50' for 'first'
And I fill in '70' for 'Second'
When I press 'Add'
View oh_noes_no_cucumber
Addition {
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Add two numbers {
Given I visit the calculator page { visit '/add' }
And I fill in '50' for 'first' { fill_in('first', 50) }
And I fill in '70' for 'Second' { fill_in('Second', 70) }
When I press 'Add' { click_button 'Add' }
vgrichina / JSONPResponse.h
Created Jun 28, 2011
Three20 JSONP parser
View JSONPResponse.h
#import <extThree20JSON/extThree20JSON.h>
#import <extThree20JSON/NSObject+SBJSON.h>
@interface JSONPResponse : TTURLJSONResponse {
vgrichina / gist:1287736
Created Oct 14, 2011 — forked from fennb/gist:1283573
nginx microcaching config example
View gist:1287736
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=microcache:5m max_size=1000m;
# Virtualhost/server configuration
server {
listen 80;
# Define cached location (may not be whole site)
You can’t perform that action at this time.