Skip to content

Instantly share code, notes, and snippets.

@btroncone
btroncone / rxjs_operators_by_example.md
Last active July 16, 2023 14:57
RxJS 5 Operators By Example
@adactio
adactio / blogServiceWorker.js
Last active March 27, 2023 09:26
A Service Worker to progressively enhance a blog by storing assets in a cache, and keeping limited caches of pages and images for offline browsing.
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function() {
// A cache for core files like CSS and JavaScript
var staticCacheName = 'static';
// A cache for pages to store for offline
@iwyg
iwyg / neos.dev.conf
Created September 25, 2014 13:11
nginx config for typo3 neos
server {
listen *:80;
server_name neos.dev;
root /var/www/neos/Web;
autoindex off;
access_log /var/log/nginx/neos.dev.access.log;
error_log /var/log/nginx/neos.dev.error.log;
index index.php index.html;
@robertlemke
robertlemke / nginx.conf
Created July 23, 2013 17:37
My very rudimentary nginx.conf file which I use for development on my Mac. I use a special setup with dnsmasq which redirects all URLs like foo.dev, foo.prod etc. to my localhost. I use Nginx in combination with PHP-FPM. You can do the same with Apache, see: https://gist.github.com/robertlemke/4951820
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@JoostKiens
JoostKiens / functions.php
Last active April 22, 2019 09:58
Improve the WordPress caption shortcode with HTML5 figure & figcaption, microdata & wai-aria attributes
<?php
/**
* Improves the WordPress caption shortcode with HTML5 figure & figcaption, microdata & wai-aria attributes
*
* Author: @joostkiens
* Licensed under the MIT license
*
* @param string $val Empty
* @param array $attr Shortcode attributes
* @param string $content Shortcode content