Skip to content

Instantly share code, notes, and snippets.

View stuartgunter's full-sized avatar

Stuart Gunter stuartgunter

  • Equal Experts
  • UK
View GitHub Profile
@stuartgunter
stuartgunter / keybase.md
Created October 23, 2017 08:09
keybase.md

Keybase proof

I hereby claim:

  • I am stuartgunter on github.
  • I am stuartgunter (https://keybase.io/stuartgunter) on keybase.
  • I have a public key ASCuar2byNruUojE6hIZHAfheFEh4oubn1cX-NXx_l9Qago

To claim this, I am signing this object:

@stuartgunter
stuartgunter / page-content.html
Created December 9, 2016 15:11
Google Bug Bounty
<!DOCTYPE html>
<script id="safenup-script">
(function() { var r=function(a){if(!g.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(k,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(l,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(m,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(n,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(p,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(q,"&#0;"));return a},k=/&/g,l=/</g,m=/>/g,n=/"/g,p=/'/g,q=/\x00/g,g=/[\x00&<>"']/;var t=function(){},u=function(){},v=function(){},w=function(){},y=function(){},aa=function(a){var c=new z("xhrRequest");c.data+=a.a+":";A(c,a.method);A(c,a.url);return c},ba=function(){},ca=function(){},da=function(){},ea=function(){},z=function(a){this.data="s97Y1g5a";A(this,a)},A=function(a,c){a.data+=c.length+":"+c},B=function(a,c){a.data=null==c?a.data+"N":a.data+(c.length+":"+c)},E=function(a){C.postMessage(a.data,D)},F=function(a){this.data=a;this.b=0};
F.prototype.a=function(){var a=G(this);if(!(0<=a))throw"invalid";var c=this.b,b=this.b+a;this.b+=a;return this.data.su
alert('hello');
@stuartgunter
stuartgunter / YourApp.java
Last active August 29, 2015 14:01
dropwizard-cassandra
public class YourApp extends Application<YourAppConfig> {
private final CassandraBundle<YourAppConfig> cassandra =
new CassandraBundle<YourAppConfig>() {
@Override
protected CassandraFactory cassandraConfiguration(YourAppConfig appConfig) {
return appConfig.getCassandraConfig();
}
};
@Override
@stuartgunter
stuartgunter / age.hs
Last active August 29, 2015 13:56
Intro to QuickCheck
data Age = Age Int
deriving (Show)
instance Arbitrary Age where
arbitrary = Age `liftM` choose (0, 100)
@stuartgunter
stuartgunter / bash_profile
Created May 10, 2013 07:40
Emacs configuration
alias em="/usr/local/Cellar/emacs/24.3/bin/emacs"
alias emc="/usr/local/Cellar/emacs/24.3/bin/emacsclient"
@stuartgunter
stuartgunter / build.xml
Created January 4, 2013 22:07
Ankyll - a generic Ant script to build and publish Jekyll-based sites to Amazon S3
<project name="Ankyll" default="prepare" basedir=".">
<description>
Ankyll is a generic Ant script to build and publish Jekyll-based sites to Amazon S3.
It provides a number of independent targets that may be run in isolation, as well as a few "phase" targets that simply depend on sensible targets to achieve their goal. More details can be found in the description of each target.
Ankyll relies on a few external tools to be available on the PATH, namely Jekyll, curl and s3cmd. If you do not have all of these tools, certain targets will not work.
</description>
<!-- the Jekyll generated site directory -->
@stuartgunter
stuartgunter / AppConfig.java
Created December 4, 2012 09:26
Fluent Bean Definition in Spring
import org.joda.time.DateTime;
@Configuration
public class AppConfig {
@Bean
public DateTime myFluentDate() {
return new DateTime()
.withYear(2012)
.withMonthOfYear(12)
.withDayOfMonth(1)
@stuartgunter
stuartgunter / gav.xml
Created November 6, 2012 10:35
couchbase-maven-plugin
<plugin>
<groupId>org.stuartgunter</groupId>
<artifactId>couchbase-maven-plugin</artifactId>
<version>1.0.0</version>
</plugin>
@stuartgunter
stuartgunter / jars.txt
Created September 18, 2012 21:06
Java 7 in IntelliJ IDEA 10.5
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/ant-javafx.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/dt.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/javafx-doclet.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/javafx-mx.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/jconsole.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/sa-jdi.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/tools.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib/jfr.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib/jce.jar
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib/charsets.jar