Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.
Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php
and app/Http/Middleware/Authenticate.php
// dm Klopapier Widget | |
// | |
// Copyright (C) 2020 by marco79 <[email protected]> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
import { shallow } from 'enzyme'; | |
import ExampleComponent from './ExampleComponent'; | |
describe('ExampleComponent', () => { | |
it('fetches data from server when server returns a successful response', done => { // 1 | |
const mockSuccessResponse = {}; | |
const mockJsonPromise = Promise.resolve(mockSuccessResponse); // 2 | |
const mockFetchPromise = Promise.resolve({ // 3 | |
json: () => mockJsonPromise, |
// https://github.com/billmalarky/react-native-queue | |
// https://github.com/devfd/react-native-workers | |
// ###################### | |
// From your application: | |
// ###################### | |
import queueFactory from 'react-native-queue'; | |
import { Worker } from 'react-native-workers'; | |
// Initialize queue and throw a few jobs on it |
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.
Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php
and app/Http/Middleware/Authenticate.php
This is a little exercise to try remember the things I struggled with, when I got started with web development. It's too easy to forget about those things after years in business. I think it's super important to keep the ability to put yourself back into the position of a beginner from time to time in order to not overcomplicate your own work and to not throw the typical "just" and "simply" sentences at other people, who get started.
The following list is not complete or very detailed. It's really all about writing down some memories quickly. Feel free to follow this experiment for yourself if you think it's useful.
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
res.sendfile('./public/index.html'); |
An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.
Everything is broken up by tag, but within each the selectors aren't particularly ordered.
I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A
A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;
curl "http://www.car2go.com/portal/berlin/page/mybookings/mapEnlarged.faces" | grep -o 'B-GO2129"}[^}]\+}' |
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.