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
public final class AESProtector { | |
private static final Configuration CONFIGURATION; | |
static { | |
try { | |
CONFIGURATION = ConfigurationLoader.load(Configuration.class, "aes-security-policy.yml", "default-aes-security-policy.yml"); | |
} catch (IOException e) { | |
throw new RuntimeException(e); | |
} | |
} |
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
class UsersRouter extends ResourceRouter | |
path: "users" | |
layout: "#contents" | |
routes: | |
":id": "show" | |
show: (id) -> | |
new User({id: id}).fetch success: (model) => | |
@layoutView ShowView, |
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
Form = Backbone.Form | |
Backbone.Form = class extends Form | |
commit: (options) -> | |
validationResults = @validate() | |
errors = _.filter validationResults, (result) -> result.level is "error" | |
return errors if errors and errors.length > 0 | |
modelError = undefined | |
setOptions = _.extend { | |
error: (model, e) -> modelError = e if e.level is "error" |
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
Backbone.Form.editors.Select2 = class extends Backbone.Form.editors.Select | |
initialize: (options) -> | |
options.options or= [] | |
super options | |
@config = _.extend { placeholder: '', allowClear: true }, @schema.select2 or {} | |
@$el.on "change", (e) => @focus() # retrieve focus ! | |
@$el.on "select2-focus", (e) => @trigger "focus", @ | |
@$el.on "select2-blur", (e) => @trigger "blur", @ |
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
#global-header { | |
.nav { | |
li.divider { | |
*width: 100%; | |
height: 1px; | |
margin: 0; | |
padding: 0; | |
background-color: darken($inverse, 30%); | |
&+li { |
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
eclipse { | |
classpath { | |
file { | |
whenMerged { classpath -> | |
def webContainer = classpath.entries.find { it.path == 'org.eclipse.jst.j2ee.internal.web.container' } | |
if (webContainer != null) { | |
def projects = classpath.entries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency } | |
def others = classpath.entries.findAll { it != webContainer } | |
others.removeAll(projects); |
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
apply plugin: 'eclipse' | |
subprojects { | |
apply plugin: 'java' | |
apply plugin: 'eclipse-wtp' | |
jdkVersion = 1.7 | |
sourceCompatibility = jdkVersion | |
targetCompatibility = jdkVersion |
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 xls; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
class UpdateVersion { | |
static void main(args) { | |
def versionList = [] |
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 sandbox; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import java.util.Map; | |
import com.google.common.base.Joiner; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Maps; |
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 sandbox; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.zip.ZipEntry; |