Skip to content

Instantly share code, notes, and snippets.

View murphysean's full-sized avatar

Sean Murphy murphysean

View GitHub Profile
@murphysean
murphysean / Drawer.java
Created July 29, 2014 05:35
A way to draw on a memory bitmap in Java
import java.awt.Color;
import java.awt.Stroke;
import java.awt.BasicStroke;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
@murphysean
murphysean / index.html
Last active August 29, 2015 14:05
Angular Binding to Factory Value
<!doctype html>
<html lang="en" ng-app="testing">
<head>
<meta charset="utf-8">
<title>Angular Binding From Controller to Service(Factory)</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular.js"></script>
</head>
<body>
@murphysean
murphysean / AccessControlFilter.java
Created August 26, 2014 23:47
Access Control Filter
package filters;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.logging.Logger;
@WebFilter(filterName = "accessControlFilter",
@murphysean
murphysean / HeaderCheckFilter.java
Created August 26, 2014 23:49
Header Check Filter
package filters;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.logging.Logger;
@murphysean
murphysean / context.xml
Created August 27, 2014 02:25
SQLite Resource Template
<Context>
<Resource
name="jdbc/example"
auth="Container"
driverClassName="org.sqlite.JDBC"
initialSize="0"
maxActive="15"
maxIdle="3"
minIdle="0"
maxWait="-1"
@murphysean
murphysean / context.xml
Created August 27, 2014 02:32
MySQL Resource Template
<Context>
<Resource
name="jdbc/example"
auth="Container"
driverClassName="com.mysql.jdbc.Driver"
initialSize="0"
maxActive="15"
maxIdle="3"
minIdle="0"
maxWait="-1"
@murphysean
murphysean / index.html
Created August 27, 2014 04:07
HTML5 Cow Game Exercise
<!DOCTYPE HTML>
<html ng-app="cowgame">
<head>
<meta charset="UTF-8">
<title>Cow Game</title>
<style>
/*TODO Add style here for the image tag in the app below, get it centered up in the page*/
/*TODO Also style up the score to be centered, and some cool color*/
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular.min.js"></script>
@murphysean
murphysean / index.html
Created August 27, 2014 04:10
HTML5 Calculator Exercise
<!DOCTYPE HTML>
<html ng-app="calculator">
<head>
<meta charset="UTF-8">
<title>Calculator</title>
<style>
/*TODO Style of the calculator*/
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular.min.js"></script>
</head>
@murphysean
murphysean / index.html
Created August 31, 2014 00:42
Angular Route Quick Start
<!DOCTYPE HTML>
<html ng-app="routing-app">
<head>
<meta charset="UTF-8">
<title>Routes</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular-route.js"></script>
</head>
<body ng-controller="MainController">
<p>Some links</p>
@murphysean
murphysean / Dockerfile
Last active August 29, 2015 14:06
Go User MicroService
FROM ubuntu
MAINTAINER murphysean84@gmail.com
COPY . /app
# Install app dependencies
EXPOSE 8080
ENTRYPOINT ["/app/UserMicroService"]