shortcut | result |
---|---|
CTRL+ALT+B |
navigate to the implementation |
CTRL+U |
navigate to the super method |
Sources:
<?php | |
class DateFixer { | |
public function fix(string $date): string { | |
$time = new DateTime($date); | |
$time->modify('+3 days'); | |
return $time->format('Y-m-d'); | |
} | |
} |
jQuery(() => | |
jQuery('td').filter(function() { | |
return jQuery(this).text().match(/^https?:\/\/.+/); | |
}).each(function() { | |
const $this = jQuery(this); | |
$this.html(jQuery('<a>', { | |
href: $this.text(), | |
rel: 'noopener noreferrer', | |
target: '_blank' | |
}).text($this.text())); |
shortcut | result |
---|---|
CTRL+ALT+B |
navigate to the implementation |
CTRL+U |
navigate to the super method |
Sources:
C:\Windows\System32\DisplaySwitch.exe /internal | |
C:\Windows\System32\DisplaySwitch.exe /external |
import {chromium as browser, ElementHandle, Page} from "playwright"; | |
import {default as PQueue} from "p-queue" | |
const username: string = 'gander' | |
const links = new Set; | |
let nextPage: string = ''; | |
(async () => { | |
const pages = new PQueue({concurrency: 7}) |
<?php | |
$callback = function () { | |
}; | |
collect()->when($callback, static function (\Illuminate\Support\Collection $collection, \Closure $callback) { | |
return \Illuminate\Support\Collection::wrap($callback($collection)); | |
}); // Same as \DB::query()->get(), Model::query()->get() | |
\DB::query()->when($callback, static function (\Illuminate\Database\Query\Builder $query, \Closure $callback) { |
<?php | |
$formatter = new \Monolog\Formatter\JsonFormatter(); | |
$handler = new \Monolog\Handler\StreamHandler('/www/logs/agent.log'); | |
$handler->setFormatter($formatter); | |
$logger = new \Monolog\Logger('agent', [$handler]); | |
$handler->pushProcessor(function (array $record) { | |
return [ | |
'timestamp' => ['seconds' => time(), 'nanos' => 0], | |
'logging.googleapis.com/severity' => 'ALERT', | |
'logging.googleapis.com/labels' => ['foo' => 'bar'], |
// ==UserScript== | |
// @name falloutcheats.com - Vue Petite - Init | |
// @namespace Violentmonkey Scripts | |
// @match https://falloutcheats.com/perks | |
// @grant none | |
// @version 1.0 | |
// ==/UserScript== | |
;((script, target) => { | |
script.setAttribute('src', 'https://unpkg.com/petite-vue'); |
const axios = require("axios"); | |
const fs = require("fs"); | |
async function main() { | |
const positions = [...Array(206).keys()].map(k => k.toString().padStart(3, '0')); | |
for (const position of positions) { | |
await download(position).catch(console.error); | |
} |
// ==UserScript== | |
// @name Redmine: Safe Time Entry | |
// @include https://*/issues/* | |
// @include https://*/time_entries/* | |
// ==/UserScript== | |
jQuery(document).on( | |
"input change click focus blur", | |
"#time_entry_hours", | |
function () { |