with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
$.fn.dataTableExt.oApi.fnPagingInfo = function (oSettings) { | |
return { | |
"iStart": oSettings._iDisplayStart, | |
"iEnd": oSettings.fnDisplayEnd(), | |
"iLength": oSettings._iDisplayLength, | |
"iTotal": oSettings.fnRecordsTotal(), | |
"iFilteredTotal": oSettings.fnRecordsDisplay(), | |
"iPage": oSettings._iDisplayLength === -1 ? | |
0 : Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength), | |
"iTotalPages": oSettings._iDisplayLength === -1 ? |
Get some virtual machine templates
This is just a reference for some commands and techniques that are not used that much and easily forgotten. These should be pretty universally available on OSX, Unix, and Linux.
Command for keeping a queue of directories as you move around
pushd ~/Downloads
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<!-- bower:css --> | |
<link rel="stylesheet" href="/bower_components/foundation/css/foundation.css" /> |
This is the quick start to get up and running within something other than angular-seed, yeoman, etc. I am actually using these files within a laravel project, so all file paths will be relevant to that framework.
This
To run just do karma start
in the root of the project
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// The previous chapter introduced the standard function Math.min that returns its smallest argument. We can do that ourselves now. Write a function min that takes two arguments and returns their minimum. |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// We’ve seen that % (the remainder operator) can be used to test whether a number is even or odd by using % 2 to check whether it’s divisible by two. Here’s another way to define whether a positive whole number is even or odd: |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |
#!/usr/bin/env bash | |
# ~/.osx — https://mths.be/osx | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |