Deployment with Envoy

// Contents of Envoy.blade.php
@servers(['web' => 'deploy-ex'])

<?php
$repo = 'git@github.com:Servers-for-Hackers/deploy-ex.git';
$release_dir = '/var/www/releases';
$app_dir = '/var/www/app';
$release = 'release_' . date('YmdHis');
?>

@macro('deploy', ['on' => 'web'])
    fetch_repo
    run_composer
    update_permissions
    update_symlinks
@endmacro

@task('fetch_repo')
    [ -d {{ $release_dir }} ] || mkdir {{ $release_dir }};
    cd {{ $release_dir }};
    git clone {{ $repo }} {{ $release }};
@endtask

@task('run_composer')
    cd {{ $release_dir }}/{{ $release }};
    composer install --prefer-dist;
@endtask

@task('update_permissions')
    cd {{ $release_dir }};
    chgrp -R www-data {{ $release }};
    chmod -R ug+rwx {{ $release }};
@endtask

@task('update_symlinks')
    ln -nfs {{ $release_dir }}/{{ $release }} {{ $app_dir }};
    chgrp -h www-data {{ $app_dir }};
@endtask

We’ll use Laravel’s Envoy to deploy a PHP application to a production server. This will make a new release directory, clone the repository into it, run any needed build steps, and then finally swap the new code out with the older code, so that Nginx and PHP-FPM serve the new code.

Now that config is very readable. Video available at the original post.

Servers for Hackers: Deployment with Envoy →

Elsewhere , , Leave a comment

Ansible, Just Use It

This talk will show how Ansible approaches configuration management, software deployment, remote execution and other tasks. We will examine how easy it is to get up and running and manage single or multiple concurrent servers in parallel, what are the differences to Puppet, Chef etc and how to customize Ansible to your needs.

Elsewhere , , Leave a comment

DaftPunKonsole

daft-punk-soundboard

There are existing apps or flash to do this, but no web version so here it is.

DaftPunKonsole (Codepen) →
DaftPunKonsole (Github) →

Elsewhere , , Leave a comment

Inside AirBnB: New York City

inside-airbnb

Inside Airbnb is an independent, non-commercial set of tools and data that allows you to explore how Airbnb is REALLY being used in New York City.

By analyzing publicly available information about Airbnb’s New York City listings, Inside Airbnb provides filters and key metrics so you can see how Airbnb is being used to compete with the residential housing market.

Inside AirBnB: New York City →

Elsewhere , , , Leave a comment

Printing Medium stories

1-bVycW_xvM83b3u3zGqInIA

We wanted to design the best printing output we could given the technological support given by the browsers. Here are the most important changes between screen Medium and print Medium

Printing Medium stories →

Elsewhere , , Leave a comment

Game of Thrones Season 5: A Day in the Life

A day behind the scenes of the upcoming season 5 which was shot in 5 countries on 151 sets for 2×120 days with 166 cast members, over 1000 crew and over 5000 extras … And then post-production hasn’t even started doing their work yet. Wow!

Elsewhere , 1 Comment

Super Mario World “Credits Warp”

Fascinating trick in which one actually reprograms Super Mario World by just playing it to make it start playing the end credits upon triggering a crash:

The goal of this run is to trick the game into playing the credits in the first level. It works by using a glitch to allow yoshi to eat a chuck, which you cannot normally do. This executes improper code and usually crashes the game. The memory addresses read during the crash can be manipulated. By spawning a p-switch in a certain order and placing it at a pixel perfect position, as well as despawning two block break sprites at a mostly pixel-perfect height, the game reads the x/y position of the sprite slots as though they were code instead of executing random code and crashing. The shells at the start of the level are spawned in these sprite slots and placed at pixel perfect positions which, when read as code, call the credits.

A much shorter run, but without any explanation, is also available.

(via Freek)

Elsewhere , , Leave a comment

Facebook Engineering: Introducing 6-pack, the open hardware modular switch

The “6-pack” platform is the core of our new fabric, and it uses “Wedge” [a custom built network switch] as its basic building block. It is a full mesh non-blocking two-stage switch that includes 12 independent switching elements. Each independent element can switch 1.28Tbps. We have two configurations: One configuration exposes 16x40GE ports to the front and 640G (16x40GE) to the back, and the other is used for aggregation and exposes all 1.28T to the back.

Wicked.

Introducing “6-pack”: the first open hardware modular switch →

Elsewhere , , Leave a comment

Flipboard Engineering: 60fps on the mobile web

scrolling

Since earlier this week Flipboard now is a website too. As they wanted to mimic their mobile apps, it would sport lots of animations. During their first tests, they found the DOM being too slow (although that’s not entirely true, see this video and its description for example). And then, an epiphany:

Most modern mobile devices have hardware-accelerated canvas, so why couldn’t we take advantage of this? HTML5 games certainly do. But could we really develop an application user interface in canvas?

And so they did. They’ve built react-canvas for this, “high performance <canvas> rendering for React components”. Reminds me of Letterpress, which is an optimized OpenGL scene, and acko.net, which is a WebGL layer which renders the site.

60fps on the mobile web — Flipboard Engineering →
react-canvas →

Elsewhere , , Leave a comment

I am the fold

i-am-the-fold

An experiment to show how designing for The Fold can be treacherous. Each line is from a random sampling of past-visitors’ viewport heights. Take care when making assumptions about people’s screen sizes on the web.

Do note that it only shows “a randomised subset of the full data”.

I am the fold →

Elsewhere , , Leave a comment