Skip to content

Instantly share code, notes, and snippets.

View louismrose's full-sized avatar

Louis Rose louismrose

View GitHub Profile
@louismrose
louismrose / module.json
Last active February 17, 2016 11:50
A version of DAMS's module.json for Flippd that includes unique textual IDs for each video
{
"title" : "DAMS",
"phases" : [
{
"title" : "Fundamentals",
"summary" : "This part of the module covers all of the essential concepts, tools and techniques that you'll need to be build habitable software in Ruby.",
"topics" : [
{
"title" : "Ruby",
"summary" : "An introduction to Ruby, which is the - purely object-oriented and somewhat functional - programming language used in DAMS.",
@louismrose
louismrose / personal_machines.md
Last active October 16, 2015 10:34
Instructions for fixing Vagrant on personal machines
  1. In the directory to which you cloned the DAMS practicals Git repository, run:
git fetch
git rebase

(If this fails, you might need to stash your changes first with git add -A then git stash. After you've rebased you can run git stash pop).

  1. Rebuild your VM:
@louismrose
louismrose / lab_machines.md
Last active October 16, 2015 10:34
Instructions for fixing Vagrant on CSE lab machines
  1. Run the following command in a terminal:
VBoxManage setproperty machinefolder /var/tmp
  1. Add the following line to the end of your ~/.bash_profile (or equivalent)
export VAGRANT_HOME=/var/tmp
class MoneyUnique
attr_accessor :pounds, :pence
def initialize(pounds, pence)
@pounds = pounds
@pence = pence
end
end
four_quid = MoneyUnique.new(4, 0)
@louismrose
louismrose / AutoSpellChecker.java
Created March 2, 2015 15:15
AutoSpellChecker.java
/*
* Based on JOrtho 05.11.2005, by i-net software (GNU General Public License)
*/
package com.inet.jortho;
import java.util.Locale;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
@louismrose
louismrose / Palindrome.java
Last active August 29, 2015 14:02
Using mutation testing to detect bugs involving exceptions?
public class Palindrome {
// This method checks whether its input reads the same forwards
// as backwards. For example, isPalindrome("noon") should return
// true, but isPalindrome("night") should return false.
// Note that this implementation contains a deliberate bug.
public static boolean isPalindrome(String s) {
if (s.length() == 0) {
@louismrose
louismrose / Demo.java
Created June 12, 2014 08:20
Obtaining values from recorded property accesses with EOL
package org.eclipse.epsilon.eol;
import java.util.Arrays;
import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
import org.eclipse.epsilon.eol.execute.context.IEolContext;
import org.eclipse.epsilon.eol.execute.introspection.IPropertyGetter;
import org.eclipse.epsilon.eol.execute.introspection.recording.IPropertyAccess;
import org.eclipse.epsilon.eol.execute.introspection.recording.PropertyAccessExecutionListener;
import org.eclipse.epsilon.eol.execute.introspection.recording.PropertyAccessRecorder;
@louismrose
louismrose / Gemfile
Created March 18, 2014 16:36
Files to reproduce mbj/unparser issue #26
ruby '2.1.1'
source "https://rubygems.org"
gem "parser", "~> 2.1.4"
gem "unparser", "~> 0.1.9"
@louismrose
louismrose / RefactoringWorkbench.java
Created February 28, 2014 11:29
RefactoringWorkbench
package org.eclipse.epsilon.eol.dom.ast2dom.workbench;
import java.io.File;
import org.eclipse.epsilon.common.parse.problem.ParseProblem;
import org.eclipse.epsilon.common.util.FileUtil;
import org.eclipse.epsilon.emc.emf.EmfUtil;
import org.eclipse.epsilon.emc.emf.InMemoryEmfModel;
import org.eclipse.epsilon.eol.EolModule;
import org.eclipse.epsilon.eol.dom.DomElement;
@louismrose
louismrose / PointExecutor.java
Created February 14, 2014 13:40
PointExecutor or ExecutionListener for recording property accesses?
/*******************************************************************************
* Copyright (c) 2008 The University of York.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Dimitrios Kolovos - initial API and implementation
******************************************************************************/