This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package yourpackage; | |
import static org.mockito.Mockito.*; | |
import java.util.HashMap; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.classic.Session; | |
import org.hibernate.dialect.MySQL5Dialect; | |
import org.hibernate.dialect.function.SQLFunctionRegistry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo; | |
import static java.util.regex.Pattern.compile; | |
import static org.apache.commons.lang3.StringUtils.substringAfter; | |
import java.util.Arrays; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.apache.commons.lang3.StringUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DataMapperHelper | |
end | |
RSpec.configure do |c| | |
# See: http://rhnh.net/2010/10/06/transactional-before-all-with-rspec-and-datamapper | |
[:all, :each].each do |s| | |
c.before s, :type => :api do | |
repository :default do |r| | |
t = DataMapper::Transaction.new(repository) | |
t.begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FactoryGirl.define do | |
factory :person do | |
sequence(:name) { |n| "Nicole Neal (#{n})" } | |
factory :person_with_party do | |
after_create do |person| | |
# TODO | |
# party = FactoryGirl.create(:party) | |
# FactoryGirl.create(:party_membership, { party: party, member: member, joined_at: 1.year.ago.year }) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.System; | |
import java.util.*; | |
import java.util.regex.*; | |
import java.util.regex.Pattern; | |
public class SearchQueryToSQL { | |
public static void main(String[] args) { | |
String search = "LOL \\* abc* def_huaua def\\_\\% [lolipop]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
# == About | |
# | |
# This is a spec to hire for a Ruby/Rails developer to work on developing tools | |
# and extensions for Zendesk - one of the best helpdesk solutions available! | |
# | |
# == More About CustomWare | |
# | |
# CustomWare is a US based company with offices in Australia, Malaysia and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://maps.googleapis.com/maps/api/geocode/json?address=Jalan%203/23A%20Danau%20Kota,%20Kuala%20Lumpur&sensor=false | |
{ | |
"results" : [ | |
{ | |
"address_components" : [ | |
{ | |
"long_name" : "Jalan 3/23a", | |
"short_name" : "Jalan 3/23a", | |
"types" : [ "route" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'idea' | |
apply from: 'libraries.gradle' | |
defaultTasks 'build' | |
group = 'com.yclian.demo.spark' | |
repositories { | |
mavenCentral() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>com.sun.jersey.contribs</groupId> | |
<artifactId>maven-wadl-plugin</artifactId> | |
<version>1.8</version> | |
<executions> | |
<execution> | |
<id>generate</id> | |
<goals> | |
<goal>generate</goal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build.gradle | 24 ++++++++++++++++++++++++ | |
1 files changed, 24 insertions(+), 0 deletions(-) | |
diff --git a/build.gradle b/build.gradle | |
index cc52b8f..c053194 100644 | |
--- a/build.gradle | |
+++ b/build.gradle | |
@@ -5,6 +5,7 @@ apply from: "${ext.scriptDir}/common/java.gradle" | |
apply from: 'libraries.gradle' |
OlderNewer