Hi folks! After a day of *#!$", DispatchCode and I have realized a working installation of Nova4 with Auth0 support. Here's our conclusions, if you want to try it :)
Create a file in \app\Auth\CustomUserRepository.php and add the following code:
Hi folks! After a day of *#!$", DispatchCode and I have realized a working installation of Nova4 with Auth0 support. Here's our conclusions, if you want to try it :)
Create a file in \app\Auth\CustomUserRepository.php and add the following code:
Reference https://stackoverflow.com/a/34407620/13287790
$ printf %s 'encode this'|jq -sRr @uri
encode%20this
$ jq -rn --arg x 'encode this' '$x|@uri'
encode%20this
# -r (--raw-output) outputs the raw contents of strings instead of JSON string literals. -n (--null-input) doesn't read input from STDIN.
<?php | |
$record = $model->fetchById(42); // return Maybe(Record) | |
$related = $record->map(function ($record) { | |
// If this function is executed, record is definitely available, no need to check. | |
return $otherModel->fetchWhere('foreign_key', $record->id); | |
}); | |
// It's still a Maybe after mapping, so you can continue mapping on the value. | |
// If the first fetchById call got you a Nothing, this is still the same | |
// Nothing, but your code doesn't need to know, it can be written |
<?php | |
const STREAM_OPEN_FOR_INCLUDE = 128; | |
final class HardCoreDebugLogger | |
{ | |
public static function register(string $output = 'php://stdout') | |
{ | |
register_tick_function(function () use ($output) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
'use strict'; | |
// This plugin will bind to all available lifecycle events and print them out as they are invoked | |
class LifecyclePrinter { | |
constructor(serverless, options) { | |
this.serverless = serverless; | |
this.options = options; | |
this.provider = this.serverless.getProvider('aws'); | |
Given a subscribed calendar with a url like
https://example.com/example.ics
To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like
https://example.com/example.ics#1
Adding the anchor tag will force Google Calendar to think of it as a new calendar
<?php | |
// include HTMLPurifier.php | |
$config = HTMLPurifier_Config::createDefault(); | |
$config->set('AutoFormat.RemoveEmpty', true); | |
$config->set('AutoFormat.AutoParagraph', true); | |
$config->set('AutoFormat.RemoveEmpty.RemoveNbsp', true); | |
$config->set('CSS.AllowedProperties', array()); | |
$config->set('HTML.ForbiddenAttributes', array('*@class')); |
# fetching a single pull request from github | |
# put it into ~/.profile or ~/.bashrc | |
function fetch_pr() { | |
PR=$1 | |
BRANCH=$2 | |
if [ -z $PR ]; then | |
echo "Missing pull request number" | |
return 1 | |
fi |
'use strict'; | |
var Octokat = require('octokat'); | |
var extend = require('lodash/object/assign'); | |
var defaults = { | |
branchName: 'master', | |
token: '', | |
username: '', | |
reponame: '' |
<? | |
require("redis.php"); | |
require("json.php"); | |
$term = $_GET['term']; | |
$r = new Redis("127.0.0.1","6379"); | |
$r->connect(); | |
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10")); |