next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt
As the web component specs continue to be developed, there has been little information on how to test them.
In particular the /deep/
combinator has been deprecated in Shadow DOM 1.0. This is particularly painful since
most end-to-end testing frameworks rely on elements being discoverable by XPath or calls to querySelector.
Elements in Shadow DOM are selectable by neither.
Webdriver.io has the standard actions by selectors, but also allows browser executable scripts to return an element
// Refer to https://gist.github.com/remy/350433 | |
try { | |
// Test webstorage existence. | |
if (!window.localStorage || !window.sessionStorage) throw "exception"; | |
// Test webstorage accessibility - Needed for Safari private browsing. | |
localStorage.setItem('storage_test', 1); | |
localStorage.removeItem('storage_test'); | |
} catch(e) { | |
(function () { | |
var Storage = function (type) { |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
~/tmp$ wget -O poly.poly https://raw.github.com/mauke/poly.poly/master/poly.poly | |
~/tmp$ file -r -k poly.poly | |
test: Python script text executable | |
- C++ source text | |
- awk script text | |
- C source text | |
- C source text | |
- makefile script text OS/2 REXX batch file text | |
- HTML document text | |
- HTML document text |
require "logstash/filters/base" | |
require "logstash/namespace" | |
# | |
# Filter plugin to normalize log levels from various logging frameworks | |
# | |
# The output field (log_level by default) will contain a number between | |
# 100 and 999, inclusive, with higher numbers indicating higher | |
# importance or severity. | |
# |
Used font: http://stuff.dasprids.de/fonts/ubuntumono-powerline.tar.bz2
You can patch any font yourself with the fontpatcher: https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher
<?php | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: Marco Pivetta | |
* Date: 16.08.12 | |
* Time: 11:05 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
class CriteriaTest extends \PHPUnit_Framework_TestCase | |
{ |
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |