Skip to content

Instantly share code, notes, and snippets.

View garystafford's full-sized avatar
💭
Happily Coding!

Gary A. Stafford garystafford

💭
Happily Coding!
View GitHub Profile
@garystafford
garystafford / create-domain.cmd
Last active December 28, 2015 03:59
From part 1 of my blog post, 'Building a Deployment Pipeline Using Git, Maven, Jenkins, and GlassFish (Part 1 of 2)'
asadmin create-domain --domaindir "%GLASSFISH_HOME%\domains" --adminport 7070 --instanceport 7071 production
asadmin create-domain --domaindir "%GLASSFISH_HOME%\domains" --adminport 6060 --instanceport 6061 testing
asadmin create-domain --domaindir "%GLASSFISH_HOME%\domains" --adminport 5050 --instanceport 5051 development
@garystafford
garystafford / App.java
Last active December 28, 2015 04:09
Main class file from blog post 'Spring Integration with Eclipse Using Maven': http://wp.me/p1RD28-Qy
package com.blogpost.maven.maven_spring;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class App {
public static void main(String[] args) {
@SuppressWarnings("resource")
ApplicationContext context = new ClassPathXmlApplicationContext(
"Beans.xml");
@garystafford
garystafford / main.cpp
Last active December 29, 2015 18:59
Repository for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
/*
* File: main.cpp
* Author: Gary Stafford
* Description: Program entry point
* Created: February 3, 2013
*/
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
@garystafford
garystafford / compile-on-rasppi.sh
Created November 30, 2013 03:03
Repository for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
scp *.jpg *.cpp *.h {your-pi-user}@{your.ip.address}:your/file/path/
ssh {your-pi-user}@{your.ip.address}
cd ~/your/file/path/
g++ `pkg-config opencv cvblob --cflags --libs` testfps.cpp testcvblob.cpp main.cpp -o FpsTest -v
./FpsTest
@garystafford
garystafford / testcvblob.cpp
Last active December 29, 2015 19:10
Repository for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
/*
* File: testcvblob.cpp
* Author: Gary Stafford
* Description: Track blobs using OpenCV and cvBlob
* Created: February 3, 2013
*/
#include <cv.h>
#include <highgui.h>
#include <cvblob.h>
@garystafford
garystafford / testfps.cpp
Last active December 29, 2015 19:10
Repository for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
/*
* File: testfps.cpp
* Author: Gary Stafford
* Description: Test the fps of a webcam using OpenCV
* Created: February 3, 2013
*/
#include <cv.h>
#include <highgui.h>
#include <time.h>
@garystafford
garystafford / testfps.hpp
Created November 30, 2013 04:29
Source code from for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
// -*- C++ -*-
/*
* File: testfps.hpp
* Author: Gary Stafford
* Created: February 3, 2013
*/
#ifndef TESTFPS_HPP
#define TESTFPS_HPP
@garystafford
garystafford / testcvblob.hpp
Created November 30, 2013 04:30
Source code from for my blog post, 'Object Tracking on the Raspberry Pi with C++, OpenCV, and cvBlob': http://wp.me/p1RD28-yW
// -*- C++ -*-
/*
* File: testcvblob.hpp
* Author: Gary Stafford
* Created: February 3, 2013
*/
#ifndef TESTCVBLOB_HPP
#define TESTCVBLOB_HPP
@garystafford
garystafford / install_java_current_version.sh
Last active December 31, 2015 07:39
Code for blog post, 'Updating Ubuntu with the Latest Java JDK': http://wp.me/p1RD28-Wq
# preview java alternatives
update-alternatives --display java
# check current version of java
java -version
@garystafford
garystafford / install_java_processor.sh
Last active December 31, 2015 07:39
Code for blog post, 'Updating Ubuntu with the Latest Java JDK': http://wp.me/p1RD28-Wq
# determine the processor architecture
uname -a
arch