Todo: ctl+b+[ scroll mode
q quit scroll mode
ctl+b ctl+o rotate panes
start new:
(function(window, document, JSON){ | |
"use strict"; | |
var SEP = '|', ua, opera, ie; | |
/* | |
* Collect Browser & Device Data | |
*/ | |
var Collector = { | |
/* | |
* MD5 Checksum calculation | |
*/ |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
# to find out the configuration commands, run: h2o --help | |
user: www-data | |
hosts: | |
"example.com": | |
listen: | |
host: xx.xx.xx.xx | |
port: 443 |
We are testing a simple controller from imaginable MVC framework.
<?php
class UserController extends AbtractController {
public function show($id)
{
$user = $this->db->find('users',$id);
if (!$user) return $this->render404('User not found');
<?php | |
// Variables used in this script: | |
// $summary - text title of the event | |
// $datestart - the starting date (in seconds since unix epoch) | |
// $dateend - the ending date (in seconds since unix epoch) | |
// $address - the event's address | |
// $uri - the URL of the event (add http://) | |
// $description - text description of the event | |
// $filename - the name of this file for saving (e.g. my-event-name.ics) | |
// |
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
<VirtualHost *:80> | |
ServerName example.dev | |
DocumentRoot /var/www/vhosts/www.example.com/public | |
# Enable Rewrite Log Debugging (Apache 2.2) | |
RewriteLog /var/www/vhosts/www.example.com/rewrite.log | |
RewriteLogLevel 6 | |
# Enable Rewrite Log Debugging (Apache 2.4) | |
# LogLevel alert rewrite:trace6 |
<?php | |
/** | |
* The __halt_compiler() function will stop the PHP compiler when called. | |
* You can then use the __COMPILER_HALT_OFFSET__ constant to grab the contents of the PHP file after the halt. | |
* In this example a PHP template is stored after the halt, to allow simple separation of logic from templating. | |
* The template is stored in a temporary file so it can be included and parsed. | |
* | |
* See: https://github.com/bobthecow/mustache.php/blob/dev/src/Mustache/Loader/InlineLoader.php | |
* http://php.net/manual/en/function.halt-compiler.php | |
*/ |
A list of amazingly awesome PHP libraries, resources and shiny things.