- Make sure you re-enable Trim support in your SSD
- Disable memory compression mechanisms:
sudo nvram boot-args="vm_compressor=1"
Example usage:
In a template:
<element focus-on="modelUpdated">
</element>
In a controller:
<?php | |
# Need Composer with PHPUnit | |
require 'vendor/autoload.php'; | |
function cantor($x, $y) | |
{ | |
// ((x + y) * (x + y + 1)) / 2 + y; | |
return bcadd(bcdiv(bcmul(bcadd($x, $y), bcadd(bcadd($x, $y), 1)), 2), $y); | |
} |
<?php | |
public function waitForAjax() { | |
$timeoutMicroSeconds = 2000000; | |
$isAjaxActive = ' | |
var isAngularAjaxActive = false; | |
try { | |
var http = angular.element(".ng-scope").injector().get("$http"); | |
isAngularAjaxActive = !!(http.pendingRequests.length); | |
} |
getCurrentRange = function () { | |
var sel = window.getSelection(); | |
var active = document.activeElement; | |
if (editor[0] == active && sel.getRangeAt && sel.rangeCount) { | |
return sel.getRangeAt(0); | |
} | |
}, |
# encoding: UTF-8 | |
# config.ru | |
require 'rack' | |
require 'haml' | |
require 'haml_file' | |
app = proc do |env| | |
HamlFile.new('views').call(env) | |
end |
www: | |
type: ruby | |
exclude_bundler_groups: | |
- development | |
config: | |
ruby-version: 1.9.3 | |
# ws: | |
# type: custom |
CONFIGURE_OPTS='--with-openssl-dir=/opt/local --with-opt-dir=/opt/local' |