Skip to content

Instantly share code, notes, and snippets.

View olizilla's full-sized avatar

Oli Evans olizilla

View GitHub Profile
@olizilla
olizilla / bundle-name.js
Created November 16, 2015 10:39
Make better bundle names
/*
> name()
'juana-gold-driver'
> name()
'olaf-tan-panel'
> name()
'tracey-lavender-microchip'
*/
function name () {
return faker.helpers.slugify(faker.fake('{{name.firstName}}-{{commerce.color}}-{{hacker.noun}}')).toLowerCase()
@olizilla
olizilla / meteor-news-2015-11-19.md
Last active November 19, 2015 10:16
Meteor News 2015-11-19
{
"points": {
"point": [
{
"latitude": "{{ latitude }}",
"longitude": "{{ longitude }}"
}
]
}
}
@olizilla
olizilla / index.html
Last active December 10, 2015 01:38
Unicode
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Unicode</title>
<style type="text/css">
#output {
font-family: monospace;
text-align: center;
margin-top: 0.4em;
@olizilla
olizilla / foo.ext3.js
Last active December 11, 2015 21:48
A proposal for an ExtJS 3 component initialisation pattern.
Ext.namespace('foo');
foo.UpdatePositionDialog = Ext.extend(Ext.Window, {
/**
* @param {Object} config Instance configuration options
*/
constructor:function (config) {
// Merge the incoming config with the defaults. Externally provided properties take precedence.
@olizilla
olizilla / README.md
Last active December 13, 2015 20:38
How to Node, NPM, Grunt, Git and Heroku

Problem: I'd prefer not to commit compiled resources to my repository, but I've still gotta deploy the thing.

Simple solution: Commit compiled resources...

Bonus credit solution: npm postinstall task runs grunt, grunt creates the compiled resources, heroku can then automagic on git push, rainbows and unicorns ensue.1,2

Your milage may vary, but on the happy path a git push heroku can deploy and run your node app.

Getting grunt to do your bidding is covered elsewhere. GRUNTEND is a fine bootstrap to getting your HTML5 Boilerplate app rolling on grunt: https://github.com/alanshaw/gruntend

@olizilla
olizilla / how-to-eclipsify-a-bad-webapp.md
Last active December 15, 2015 12:49
From webapp sludge to a working Eclipse project deployed to local Tomcat

How to eclipsify a bad webapp

Assumptions

  • Tomcat 7 is available and imported into eclipse
  • Eclipse Juno, EE flavour.

Any mismatch between these assumptions and reality may result in failures and face-palm.

Steps

@olizilla
olizilla / how-to-git.md
Last active December 15, 2015 13:49
Fear change? Files got you down? Meet Git, the Cesar Millan of version control. Git is hard so you don't have to be.

Git: The File Whisperer

Dominate unruly files with the Git technique

You have a folder with some files in. Right now you have no way of finding out what those files contained yesterday, or which of them is the latest version of that doc you've been emailing back and forth with those other change makers. If you are really, really disciplined, there is a tiny chance that you won't lose something important, at some point. But no matter what delusions you may have picked up, you are, like the rest of us, fallible, so chances are you already did.

Lets discipline these unruly files with the wonder of version control. Bring out the git.

The first step is to run git on your local project directory, turning it into a local git repository.

@olizilla
olizilla / stob3-tldr.md
Last active December 16, 2015 13:08
A treacly reduction of knee-jerk facts from State of the Browser 2013.

[State of the Browser] 2013 TL;DR

A roughly chronological regurgitation of a browser evangelist fugue.

  • [@mollydotcom] and [londonwebstandards.org] thinks we should be more worried about the expanding "webkit monoculture".
  • [@atoker] pushed a plausible "it's not webkit, it's lazy developers" defence, carefully paraphrasing to "webkit multiculture" and finally accepting the role of oppressor with "webkit is an ecosystem so it doesn't matter".
  • [@thebeebs] showed IE's multi-fondle support. Aparently Bill has 100 hundred points of touch in his office, and they have work in the pipe to let mutliple users touch and mouse at the same device at the same time. It's gonna be an MSVendorPrefix party.
  • [@paul-kinlan] showed which fancy features we can use on mobile, today, via [onmobile.iwanttouse.com]. No word on Blink or Chrome futures though.
  • [@andreasbovens] did talk about Blink, and for no doubt the hundredth time, reminded us that webkit is a genric term, Opera was alwa
@olizilla
olizilla / 2013-02-08-hating-on-java-for-xml.md
Last active December 17, 2015 03:49
A classic rant that starts with a "Why all the Java XML hate" and blends dementedly into DSL rage.

Hating on Java for XML? Your DSL is worse.

Do tell me again how you've dismissed Java as a waste of time due to it's XML fetish. How fascinating.

Hating on Java for it's XML love is like hating on a government for wanting transparency.

Java is the incumbent and XML is an open standard for defining structured documents. Every drop of logic that you can externalise allows some other system, regardless of it's implementation language, to operate on it. I can't think of a useful language that doesn't have a library for dealing with XML.