Skip to content

Instantly share code, notes, and snippets.

View anthonybrown's full-sized avatar
🎯
Focusing

Tony Brown anthonybrown

🎯
Focusing
View GitHub Profile
@anthonybrown
anthonybrown / App.js
Created January 16, 2013 01:47 — forked from anonymous/App.js
// Todoapp using Localstorage
/*global window */
/*global document */
(function () {
"use strict";
window.todoApp = {
addTodoBtn: document.getElementById("addTodo"),
( function ( window, undefined ) {
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings = {
logLevels: { 'error': true, 'warn': true, 'info': true, 'debug': false, 'deprecated': true },
errorhandling: false,
ribbon: false,
locale: 'en',
floatingmenu: {
width: 630,
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div class="container">
*
* @link http://themes.required.ch/news/getting-love-for-required-foundation-thank-you/#comment-2862
*/
?><!DOCTYPE html>
<?php
class BaseModel extends Eloquent {
public static function shouldReceive()
{
$repo = get_called_class() . 'Repository';
$mock = Mockery::mock($repo);
App::instance($repo, $mock);

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


<?php
/**
* Custom front-page.php template
*
* Used to display the homepage of your
* WordPress site.
*
* @link http://themes.required.ch/?p=606
*/
@anthonybrown
anthonybrown / index.html
Created February 23, 2013 20:31
A CodePen by Tony Brown. Squishy Toggle Buttons - Simulating squishy rubber (elastomer) buttons, inspired by designs on Dribbble
<div class="container">
<div class="toggle">
<input type="checkbox">
<span class="button"></span>
<span class="label">+</span>
</div>
<div class="toggle">
<input type="checkbox" checked>
<span class="button"></span>
<span class="label">–</span>
crunch.pubsub = _.extend({}, Backbone.Events);
// Hide backbone implementation by aliasing
crunch.pubsub.publish = crunch.pubsub.trigger;
crunch.pubsub.subscribe = crunch.pubsub.bind;
crunch.pubsub.unsubscribe = crunch.pubsub.unbind;

The way of the substack

With over 200 modules in npm, and many such as browserify, dnode, optimist, etc. relied upon day-to-day by developers all around the world, substack is a pretty damn productive guy.

Plus, he's got an awesome philosophy on programming to boot (yes, there is a programming philosophy! ... no comprende? Let me explain later).

BTW, how do I know this? I got to talk to him at campjs as he wrote & published a module (lexical-scope to be exact). He was super friendly and shared alot of his thoughts on many topics.

All in all, it was really cool to meet someone that's completely congruent with what he says & lives out as a programmer. It almost felt Bret Victor-like.