Skip to content

Instantly share code, notes, and snippets.

View seeruk's full-sized avatar

Elliot Wright seeruk

View GitHub Profile
(function(window, undefined) {
var Class = function() {
// Realistically assigning this to a variable is uneccessary
var constructor = (function() {
console.log("I have just been instantiated!");
})();
var privProperty = "foo";
var BreakOut = (function() {
"use strict";
var defaults {
ball: {
position: {
x: 200,
y: 200
},
/**
* Indentation! Fun for the masses!
*/
// Examples indented for the lines!
// Initial:
object.
method1(
-Xms2G
-Xmx2G
-XX:ReservedCodeCacheSize=500m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
<?php
function fibonacci($n)
{
$fib = [0, 1];
for ($i = 1; ($i + 1) < $n; $i++) {
$fib[] = $fib[$i] + $fib[$i - 1];
}
<?php
/**
* Sum Interface
*
* @author Elliot Wright <elliot@byng.co>
*/
interface SumInterface
{
/**
<?php
/**
* Sum Interface
*
* @author Elliot Wright <elliot@byng.co>
*/
interface SumInterface
{
/**
@seeruk
seeruk / cvr-euea.json
Last active August 29, 2015 14:06
Constraint Violation Response - Email Unique Entity Assertion
REQUEST:
{
"forename": "Elliot",
"surname": "Wright",
"email": "elliot@byng.co",
"date_of_birth": "1992-03-18"
}
RESPONSE:
@seeruk
seeruk / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@seeruk
seeruk / GetSet.xml
Created August 29, 2014 08:33
Sublime Text 3 PSR1/2 Getter and Setter Snippet
<!--
gs
A time-saving device for creating getters & setters in PHP classes
Based on a snippet originall published by @akrabat:
http://akrabat.com/software/sublime-text-2-snippet-for-php-getter-and-setter-generation/
HOW TO USE
In your PHP class, simply type the following: