The good old PhantomJS times are over. The project is not maintained anymore and it is recommended to switch over to Chrome headless. Just run a local Selenium standalone server:
$ java -jar Sites/selenium-server-standalone-3.4.0.jar
const CFG = require('../codecept.conf.js').config.myConfig | |
const MailSlurpClient = require('mailslurp-client') // https://www.npmjs.com/package/mailslurp-client | |
const emailApi = new MailSlurpClient.InboxcontrollerApi() | |
var assert = require('assert') | |
class EmailHelper extends Helper { // eslint-disable-line no-undef | |
async setupMailbox () { | |
var data = | |
await emailApi.createRandomInboxUsingPOST(CFG.emailApiKey) | |
.catch(err => { console.log(err); assert.fail(err) }) |
# Puma can serve each request in a thread from an internal thread pool. | |
# The `threads` method setting takes two numbers: a minimum and maximum. | |
# Any libraries that use thread pools should be configured to match | |
# the maximum value specified for Puma. Default is set to 5 threads for minimum | |
# and maximum; this matches the default thread size of Active Record. | |
# More: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#threads | |
# | |
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } | |
threads threads_count, threads_count |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
There are a lot of complaints going around about Laravel these days, but a lot | |
of the important ones seem to be missing from the spotlight. | |
Bugfixes, issues and pull requests being left open for months with no | |
clarification of intent: | |
- https://github.com/laravel/framework/pull/1799 | |
- https://github.com/laravel/framework/issues/1963 | |
- https://github.com/laravel/framework/issues/2089 | |
- https://github.com/laravel/framework/issues/2234 |
<?php | |
class User extends Eloquent { | |
public function getOldest() | |
{ | |
return $this->orderBy('age', 'desc')->first(); | |
} | |
} |
<?php | |
// ... | |
class FeatureContext extends MinkContext | |
{ | |
/** | |
* Looks for a table, then looks for a row that contains the given text. | |
* Once it finds the right row, it clicks a link in that row. | |
* |
dojo.require("dojo.io.script"); | |
dojo.require("dijit.Dialog"); | |
dojo.require("dijit.TooltipDialog"); | |
dojo.require("dijit.layout.ContentPane"); | |
dojo.require("dijit.form.Button"); | |
dojo.require("dijit.form.Form"); | |
dojo.require("dijit.form.Textarea"); | |
dojo.require("dijit.form.ValidationTextBox"); | |
dojo.require("dojo.cookie"); | |
dojo.require("dojo.parser"); |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.