Skip to content

Instantly share code, notes, and snippets.

View brad-jones's full-sized avatar

Brad Jones brad-jones

View GitHub Profile
@brad-jones
brad-jones / oop.js
Last active August 29, 2015 14:05
Classes for browsers
/**
* !!! SEE: https://github.com/brad-jones/oop.js !!!
*
* Classes for browsers
* =============================================================================
* Like many others this is my attempt at creating a "classical" class in
* javascript. My motivations are because I like the look of a traditional
* class. A prototype class is just so segmented and verbose. Thats really all
* it comes down to because I could have fixed my IE bugs by dropping Writh's
* classical and just doing everything in native code. I felt like that was
@brad-jones
brad-jones / jpegfit.php
Created August 29, 2014 02:47
JPEG Compress to target Filesize
<?php
/**
* JpegFit Class
* 2007-04-12 Image Resource getters and setters with examples
* 2007-03-29 First Version
*
* IMPORTANT NOTE
* There is no warranty, implied or otherwise with this software.
*
* LICENCE
@brad-jones
brad-jones / README.md
Last active August 29, 2015 14:14 — forked from peteboere/README.md
@brad-jones
brad-jones / Readme.md
Created February 6, 2015 06:09
Sublime Text Git Projects

Sublime Text Git Projects

The basic idea is to replicate the same sort of functionality that this atom plugin (https://github.com/prrrnd/atom-git-projects) provides but for Sublime.

I really like Atom for its feature set but its just still too slow. This was one of the things that I missed when I went back to using Sublime.

I tried to get this working as a Python Plugin but I couldn't work out how to

@brad-jones
brad-jones / hackpad-mod.js
Created February 23, 2015 06:15
Hackpad.com User Script
// ==UserScript==
// @name Hackpad.com User Script
// @version 0.1
// @description Forces the New Hackpad Button to Open in Current Tab/Window
// @author Brad Jones
// @include https://hackpad.com/*
// ==/UserScript==
$(document).ready(function()
{
@brad-jones
brad-jones / graphdb-ideas.md
Last active September 2, 2015 12:51
Brads Brain Dump on Relationships, Graphs, Objects, etc

Brads Brain Dump on Relationships, Graphs, Objects, etc

How to best store all this info on disk?

I want to build an ORM without the mapping bit. ie: We use objects in our code, we relate objects to one another in our code. So lets store these object as they are and not MAP them into some other form.

NOTE: I use json to describe my data structures but it could be in any format.

@brad-jones
brad-jones / MyConnection.php
Created January 29, 2014 06:25
Daemonized Scgi Server
<?php
/**
* Class: MyConnection
* =============================================================================
* This class works with an individual connection to our server.
* And deals more with the actual SCGI protocol.
*/
class MyConnection
{
/**
@brad-jones
brad-jones / a-class-tpl.php
Last active February 27, 2016 05:56
Foil Nested Blocks Test Case
class AClass
{
public function Bar()
{
echo "Bar";
}
}
@brad-jones
brad-jones / composer.json
Created February 27, 2016 13:12
Test Case for goaop/parser-reflection
{
"require": {
"goaop/parser-reflection": "^1.0",
"symfony/console": "^3.0"
}
}
@brad-jones
brad-jones / bitbucket-mod.js
Created September 8, 2016 05:43
Bitbucket PR Userscript
// ==UserScript==
// @name bitbucket.com User Script
// @version 0.1
// @description Copies the source branch name into the PR Title.
// @author Brad Jones
// @include https://bitbucket.org/*
// ==/UserScript==
$(document).ready(function()
{