Skip to content

Instantly share code, notes, and snippets.

View dwelch2344's full-sized avatar

David Welch dwelch2344

View GitHub Profile
@dwelch2344
dwelch2344 / gist:4066668
Created November 13, 2012 16:11
Logout issues
function defaultLogout(){
$(config.appSwitcherSelector).slideUp();
var res = [];
// create our status checking function
function checkStatus(){
for(var i in res){
// don't do anything if requests are still pending
'use strict';
/* App Module */
angular.module('publisher',[]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/articles', {templateUrl: 'partials/articles.html', controller: PublishController}).
when('/articles/:articleId', {templateUrl: 'partials/article.html', controller: PublishController}).
otherwise({redirectTo: '/articles'});
@dwelch2344
dwelch2344 / app.js
Created November 15, 2012 03:46
Angular module
'use strict';
/* App Module */
var publisher = angular.module('publisher',[]).
config(['$routeProvider', function($routeProvider) {
console.log("Route provider: ", $routeProvider);
$routeProvider.
when('/articles', {templateUrl: 'partials/articles', controller: PublishListController}).
when('/articles/:articleId', {templateUrl: 'partials/edit', controller: PublishArticleController}).
/*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
@dwelch2344
dwelch2344 / pom.xml
Created November 27, 2012 14:02
A pom.xml excerpt of AppAssembler configurations
<build>
<finalName>SomeProject</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<assembleDirectory>target</assembleDirectory>
<programs>
@dwelch2344
dwelch2344 / Const.java
Created November 27, 2012 15:41
Gists for testing reporting issue
public class Const {
public static final String url = "https://<thru-lb.org.com>//services/reports/Report?name=Volunteer%20Assistant%20Recorders&format=pdf&locale=en";
public static final String goodUrl = "http://<host:port>//services/reports/Report?name=Volunteer%20Assistant%20Recorders&format=pdf&locale=en";
public static final String user = "DMD";
public static final String password = "password";
}
@dwelch2344
dwelch2344 / EndpointServer.java
Created November 29, 2012 18:51
A simple proxy test
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
<c:for... >
<a data-language="${lang.code}" href="javascript:;">${lang.name}</a>
</c:for>
@dwelch2344
dwelch2344 / jsonp.html
Created December 12, 2012 22:38
A simple test
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
function djCallback(data){
console.log("DJ got data", data);
}
@dwelch2344
dwelch2344 / ubuntu-oracle-java7.sh
Created December 18, 2012 15:16
Commands to install Oracle Java 7 onto Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer