Skip to content

Instantly share code, notes, and snippets.

View abstract.md

Laravel but in NodeJS

Ever wanted to give full-stack JS a try, but don't know where to start? AdonisJS is JS framework, inspired by Laravel. It has a similar ORM, similar routing, and all the other bits you'd expect to use in a Laravel app. In this talk, we'll review the differences and similarities between the two. We'll also learn about the native async/await functionality you can use, to increase the number of users your site can support.

You don't need to know anything about AdonisJS to attend this talk, but a familiarity with Laravel will be useful.


View abstract.md

Next.js: the React framework

Ever struggle with structuring ReactJS apps, and all the tooling that it requires? Next.js is the perfect way to learn and use it, to build small and stable applications; that have ReactJS front-ends. In this talk, we'll look at how to build these kinds of apps. We'll also look at topics like animation and tools like styled components.

You'll soon forget about your Webpack worries, as Next.js lets you focus on what you want to build.

You don't need to know anything about Next.js to attend this talk, but familiarity with ReactJS will be useful.

View abstract.md

Background processing with AWS Lambda

You've probably heard a few talks about queued jobs processing, in your favourite framework. I'm here to show you that AWS Lambda can do the work of a dedicated background processing app at a fraction of the cost and complexity.

In this talk, we'll take a look at an app that processes user-submitted audio files, and returns the waveform images back. We'll cover what you need to know to get this kind of app working, and how Lambda interacts with other AWS services (like S3).

View abstract.md

Hosting Docker apps on AWS, with Fargate

It's one thing to make your app run in Docker, but it's another to put that on the internet. In this talk, we'll look at what it takes to get your Dockerized app running in AWS. Along the way, we'll learn about load balancers, Cloudformation, and Fargate.

Don't panic! You don't need to know anything about AWS to attend this talk.


@assertchris
assertchris / CacheProxy.php
Created Dec 24, 2019
Livewire state hoops
View CacheProxy.php
<?php
namespace App\Http\Livewire;
class CacheProxy
{
private $key;
public function __construct($key)
{
View SharedByMe.php
<?php
namespace App\Http\Livewire;
use App\Models\Share;
use Carbon\Carbon;
use Livewire\Component;
class SharedByMe extends Component
{
View SelectProvider.php
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class SelectProvider extends Component
{
const hasSeenComponentSessionKey = 'livewire:has-seen-providers';
View EditPost.php
<?php
// snip
public function uploadImage($id, $name, $type, $size, $data)
{
$raw = substr($data, strpos($data, ',') + 1);
$raw = base64_decode($raw);
$uuid = (string) Str::uuid();
View hooks.js
import { useState, useCallback } from "react"
import qs from "query-string"
const getQueryStringValue = function(router, key, initial) {
if (typeof router.query[key] !== "undefined") {
return router.query[key]
}
return initial
}
View validate.php
<?php
$expected = ["name", "email", "comments"];
$required = ["name", "comments"];
foreach ($_POST as $key => $value) {
if (!is_array($value)) {
$value = trim($value);
}