Skip to content

Instantly share code, notes, and snippets.

View apetro's full-sized avatar
Working from home

Andrew Petro apetro

Working from home
View GitHub Profile
btopro /
Last active April 12, 2017 04:05
ELMS:LN - Apereo incubation submission

##a. A proposed name for the project, together with a brief explanation of why the project wishes to enter Apereo incubation, and how the project would benefit higher education. ELMS: Learning Network A Next generation digital learning environment (NGDLE) that seeks to change the way systems are developed in the educational technology space. We seek to expand the number of developers in the space and the number of instructional technologists, instructional designers, faculty and students who can actively participate in the construction of learning ecosystems. This project has roots in faculty and staff empowerment and has been built at the grass roots level at Penn State. It has grown from a homegrown custom solution into a sophisticated framework utilized and collaborated on by members of different institutions both in and outside of Penn State. Through building on a common development framework of Drupal CMS we have been able to bridge the development gap so common in getting communities going by extending

baumandm /
Last active November 3, 2023 07:18 — forked from dergachev/
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from Updated to use a palette to improve quality and skip gifsicle.


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

timlevett /
Last active August 29, 2015 14:16
Template-able Widgets

Custom Template Widgets

In this pull request we created the ability to have template widgets. This feature allows you to change only your entity file for portal to get a smart widget. The example I give is the payroll information portlet.

You need to add the following portlet-preferences to your portlet-definition file:


This is where we will get the data from (in a JSON format). If this is an external call outside of the portal container, you have to do some magic that I'll cover in another post.

btford /
Created October 30, 2014 06:59
Why you shouldn't worry so much about migrating with Angular

Several developers asked me about how difficult it will be to migrate Angular 1 to Angular 2. Angular 2 isn't done, so I legitimately have no idea how hard it will be. But there are a few high-level guiding principals in the design of Angular 1 that make adapting to changes like this fairly painless.

Angular 1 was designed so it would have a fairly minimal API surface. Let's look at controllers, since these are the meat of your app. Controllers are just functions that get passed other components as arguments:

MyController ($scope) {
  $scope.list = [];
  $scope.addItem = function (name) {
rsachdeva / todo-tasks-lists-summer-holidays.clj
Created June 14, 2013 14:58
todo list (in clojure) for kids summer holidays tasks entered dynamically on command line!
View todo-tasks-lists-summer-holidays.clj
(defn todo-prompt [question]
(println question)
;mutable with atom and swap!
(def todos (atom {}))
(defn todo-details [todos]
(let [task-code (todo-prompt "Task code?")
anonymous /
Created January 3, 2013 16:08
Sketch of an attribute DAO that computes a new attribute value from the input. One would wrap this up in a parent DAO that merges with an echo of the input, or something, to ensure the resulting user attribute map returned from the whole attributes subsystem retains the username mapped as an attribute as well, as well as any other attributes col…
package net.unicon.cas.addons.persondir;
import java.util.List;
import java.util.Map;
* Sketch of an attribute DAO that computes a new attribute value from the input.
Created May 17, 2012 16:46
Two simple commands to resolve problems with Maven installed via Homebrew
defaults write ~/.MacOSX/environment.plist M2_HOME `brew --prefix maven`/libexec
defaults write ~/.MacOSX/environment.plist M2 `brew --prefix maven`/libexec/bin
View gist:1288495
SEVERE: Servlet.service() for servlet cas threw exception
java.lang.IllegalStateException: The string-encoded flow execution key is required
at org.jasig.cas.web.flow.CasFlowExecutionKeyFactory.parseFlowExecutionKey(
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(
at org.springframework.web.servlet.DispatcherServlet.doDispatch(
at org.springframework.web.servlet.DispatcherServlet.doService(
at org.springframework.web.servlet.FrameworkServlet.processRequest(
at org.springframework.web.servlet.FrameworkServlet.doPost(
at javax.servlet.http.HttpServlet.service(
apetro /
Created September 7, 2011 19:25 — forked from jasonrudolph/
Programming Achievements: How to Level Up as a Developer
jasonrudolph /
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer