This file contains hidden or 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.util.List; | |
@Data | |
public class ArrayOrObject<T> { | |
private List<T> data; | |
private Boolean isObject; | |
} |
This file contains hidden or 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
/* | |
Extension of the code found at the following SO post | |
http://stackoverflow.com/questions/31075341/how-to-create-ractives-subcomponents-dynamically-and-change-them-programmatical | |
*/ | |
let Ractive = require("Ractive"); | |
Ractive.components.dynamic = Ractive.extend({ | |
template: "{{>impl}}", | |
components: { // you can set whatever components you need, or just use the global ones via Ractive.components }, | |
partials: { |
This file contains hidden or 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
var es6 = require("es6-shim"); | |
var net = require("net"); | |
var Emitter = require("events").EventEmitter; | |
var https = require("https"); | |
var http = require("http"); | |
var priv = new Map(); | |
var errors = { | |
cloud: "Unable to connect to spark cloud.", |
This file contains hidden or 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
CREATE PROCEDURE SetParentContentType | |
@childAlias as varchar(MAX), | |
@parentAlias as varchar(MAX) | |
AS | |
BEGIN TRANSACTION; | |
declare @childId as int; | |
declare @parentId as int; | |
SET @childId = (SELECT nodeId FROM cmsContentType WHERE alias = @childAlias); |
This file contains hidden or 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
param( | |
[string]$version, | |
[string]$target = ".", | |
[string]$config, | |
[string]$sitehost, | |
[string]$dbhost, | |
[string]$dbname, | |
[string]$dbuser, | |
[string]$dbpass, |
This file contains hidden or 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
/* | |
* Copyright 2011 the original author or authors. | |
* | |
* Licensed 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
configurations { | |
jarsIWant | |
} | |
dependencies { | |
jarsIWant ... | |
} | |
task copyJarsToWEBINF(type: Sync) { | |
from configurations.jarsIWant |
This file contains hidden or 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
configurations { | |
war_common | |
war_secure | |
mwar | |
pwar | |
swar | |
uwar | |
mwar.extendsFrom war_common |
This file contains hidden or 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 groovy.json.*; | |
class MyBean extends Expando { | |
def methodMissing(String name, def args) { | |
if(args.size() == 0) { | |
super.getProperty(name) | |
} else if(args.size() == 1) { | |
def value = args[0]; | |
def result = value; |
This file contains hidden or 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 org.company.gradle; | |
import groovy.lang.Closure; | |
import groovy.lang.MissingMethodException; | |
import org.gradle.api.Plugin; | |
import org.gradle.api.Project; | |
import java.util.HashMap; | |
import java.util.Map; |