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
from bottle import Bottle, run, request, response, abort, static_file,debug | |
import os | |
import json | |
app = Bottle() | |
prefix = "./albums" | |
@app.get('/') |
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 uuids = angular.module('uuids', []); | |
uuids.factory("rfc4122", function () { | |
return { | |
newuuid: function () { | |
// http://www.ietf.org/rfc/rfc4122.txt | |
var s = []; | |
var hexDigits = "0123456789abcdef"; | |
for (var i = 0; i < 36; i++) { | |
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); | |
} |
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 app = angular.module('app', []); | |
app.controller('controller', function ($scope, websocketService) { | |
$scope.msg = "..."; | |
websocketService.start("ws://localhost:8080/events", function (evt) { | |
var obj = JSON.parse(evt.data); | |
$scope.$apply(function () { | |
$scope.msg = obj.message | |
}); |
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
private void run(File srcDir) throws IOException, JDOMException { | |
List<String> mapperClassNames = new ArrayList<String>(); | |
SAXBuilder builder = new SAXBuilder(); | |
Document document = builder.build(new FileReader(new File(srcDir, "src/main/resources/dataAccessContext.xml"))); | |
Element rootElement = document.getRootElement(); | |
Namespace namespace = Namespace.getNamespace("http://www.springframework.org/schema/beans"); | |
List<Element> beans = rootElement.getChildren("bean", namespace); | |
for (Element e : beans) { | |
List<Element> property = e.getChildren("property", namespace); |
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
Group dependencies in Gradle: | |
ext.libraries = [ | |
logging: [ | |
"ch.qos.logback:logback-classic:${versions.logback}", | |
"org.slf4j:log4j-over-slf4j:${versions.slf4j}", | |
"org.slf4j:jul-to-slf4j:${versions.slf4j}" | |
] | |
] |
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
07:20:25.162 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration jdom:jdom:1.0(runtime). | |
07:20:25.162 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration xerces:xmlParserAPIs:2.6.2(runtime). | |
07:20:25.163 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] version for xerces:xmlParserAPIs:2.6.2(runtime) is not selected. ignoring. | |
07:20:25.163 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration xerces:xercesImpl:2.6.2(runtime). | |
07:20:25.164 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] version for xerces:xercesImpl:2.6.2(runtime) is not selected. ignoring. | |
07:20:25.164 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration xom:xom:1.0b3(runtime). | |
07:20:25.165 [DEBUG] [org.gradle.api |
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
#!/bin/sh | |
set -e | |
set -u | |
cleanup() { | |
rm -f -P ${DOWNLOAD_FILE} ${DECRYPTED_FILE} ${DECRYPTED_FILE}.gpg | |
} | |
trap cleanup ERR |
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
#!/usr/bin/python | |
''' | |
The AWS IAM user needs these permissions. Note these permissions | |
are set on the user, not the bucket. | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ |
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
The POM of the app that would publish artifacts would look like this: | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.petrovic</groupId> | |
<artifactId>maven-s3-lab</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
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: 'java' | |
apply plugin: 'maven-publish' | |
group = "org.petrovic" | |
version = "0.2" | |
ext.versions = [ | |
logback: "1.0.13", | |
junit: "4.11", | |
hamcrest: "1.3" |