Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kevinjalbert's full-sized avatar

Kevin Jalbert kevinjalbert

View GitHub Profile
@kevinjalbert
kevinjalbert / javalanche_error_issue1.txt
Created January 25, 2012 20:02
Javalanche-0.4 Error - Issue #1
scan:
javalancheTask:
[junit] Scanning for mutations
[junit] org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
[junit] at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110)
[junit] at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
[junit] at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
[junit] at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:323)
[junit] at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:433)
@kevinjalbert
kevinjalbert / gist:1982702
Created March 6, 2012 01:23
Javalanche-0.4 Error - Issue #5
getMutationScores:
[exec] /home/jalbert/workspace1/jgap_3.6.1_full/runMutations.sh /home/jalbert/workspace1/jgap_3.6.1_full/mutation-files/mutation-task-ogrep: mutation-files/output-runMutation-1.txt: No such file or directory
[exec] rg_jgap-01.txt 1 ""
[exec] Task 1 not completed - starting again
[exec] Buildfile: /home/jalbert/workspace1/jgap_3.6.1_full/javalanche.xml
[exec]
[exec] runMutations:
[exec]
[exec] javalancheTask:
[exec] [junit] Run mutation testing (without impact detection)
@kevinjalbert
kevinjalbert / gist:2036944
Created March 14, 2012 14:42
Javalanche-0.4 Error - Issue #13
[exec] javalancheTask:
[exec] [junit] Run mutation testing (without impact detection)
[exec] [junit] org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 36: Expected an object reference, but found .
[exec] [junit] at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:293)
[exec] [junit] at org.objectweb.asm.util.CheckMethodAdapter$1.visitEnd(CheckMethodAdapter.java:373)
[exec] [junit] at org.objectweb.asm.util.CheckMethodAdapter.visitEnd(CheckMethodAdapter.java:740)
[exec] [junit] at org.objectweb.asm.ClassReader.accept(ClassReader.java:1490)
[exec] [junit] at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
[exec] [junit] at de.unisb.cs.st.javalanche.mutation.util.AsmUtil.checkClass(AsmUtil.java:124)
[exec] [junit] at de.unisb.cs.st.javalanche.mutation.javaagent.classFileTransfomer.MutationFileTransformer.transform(MutationFileTransformer.java:108)
@kevinjalbert
kevinjalbert / git-rubocop
Created May 1, 2014 20:14
Executable to run rubocop only on added/modified files in a git repository
#!/usr/bin/env ruby
# Improved from https://gist.github.com/mpeteuil/6147292
require 'english'
require 'rubocop'
VALID_FILE_EXT = %w(.rb .rabl .rake)
ADDED_OR_MODIFIED = /^\s*(A|AM|M)/.freeze
class NotInRepository < StandardError; end
@kevinjalbert
kevinjalbert / standuplog
Created May 1, 2014 20:24
Show all of your git commits that happened since the last work day
#!/usr/bin/env ruby
require 'date'
COMMITTER = 'kevin.j.jalbert'
def last_work_day(date)
if date.monday?
(date.to_date - 3).httpdate
else
(date.to_date - 1).httpdate
@kevinjalbert
kevinjalbert / No Whatpulse + Ethernet
Created December 13, 2014 15:23
Latency between Mac and Router
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.440 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.466 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.559 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.544 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.571 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=0.544 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=0.526 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=0.442 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=0.515 ms
@kevinjalbert
kevinjalbert / unique_log_urls.rb
Created January 13, 2015 18:15
unique_log_urls
require 'uri'
files = Dir[ARGV[0]]
post_urls = Hash.new(0)
get_urls = Hash.new(0)
@exclude_url_regexes = Regexp.union([
/^\/admin/,
/^\/oauth2callback/,
@kevinjalbert
kevinjalbert / readme.md
Last active December 31, 2021 03:49
Project-Wide Search and Replace with Vim

Project-Wide Search and Replace with Vim

There are many instances where you might want to perform a mass search and replace in Vim. The following are two commands that can help out with such a task.

List of Files

First you need to acquire a list of files in which you want to perform search and replaces on. The following Vim command args allows you to store a set of file names to act on later.

:args `<command which generates a file list>`

Thus we can use the following to store a list of files which match the 'Base::Lol::' . pattern.

@kevinjalbert
kevinjalbert / record_screen.applescript
Created April 10, 2015 13:32
Record Screen with Applescript
on run {input, parameters}
tell application "QuickTime Player" to quit
delay 0.5
tell application "QuickTime Player" to activate
delay 0.5
@kevinjalbert
kevinjalbert / vim-over.md
Created April 24, 2015 19:45
Vim substitution feedback using vim-over

Vim substitution feedback using vim-over

It is common while in vim to perform substitution tasks over the text you are editing. This is often accomplished using the following command:

:%s/<find>/<replacement>/g

The %s command will perform substitution over every line within the buffer. The /<find>/<replace> specifies the substitution to perform. Finally the /g indicates that this should apply to multiple occurrences if they are present on the same line.

This works great, although there is little affordance in determining whether the specified <find> will hit the matches you are interested in. The aforementioned command is a all-or-nothing with respect to execution, there is no visual feedback until you execute the command.

Visual Feedback via vim-over