This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// Query Posts 3, 5, 22 and 7 | |
$ids = [3, 5, 22, 7]; | |
$ordered = implode(',', $ids); | |
$items = \App\Post::whereIn('id', $ids) | |
->orderByRaw(DB::raw("FIELD(id, $ordered)")) | |
->get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon Affiliate cleaner | |
// @namespace https://gist.github.com/gsabater/d7767ee5d21069a814967ecfa81bd415 | |
// @version 0.3 | |
// @description Remove affiliate links for amazon links | |
// @author You | |
// @match * | |
// @include * | |
// @grant none | |
// ==/UserScript== |