This file contains hidden or 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
| indexer: | |
| stub_paths: | |
| - "%application_root%/_ide_helper.php" | |
| - "%application_root%/_ide_helper_models.php" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/Support/Facades" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/Database/Eloquent" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/Http" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/Routing" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/View" | |
| - "%application_root%/vendor/laravel/framework/src/Illuminate/Foundation" |
This file contains hidden or 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
| /** | |
| * Alpine.js magic property to confirm a change. | |
| * | |
| * Usage: @click="$confirm('Are you sure?').then(copied = true)" | |
| * | |
| * @returns {(message: string) => Promise<void>} - A function that takes the text to display as an argument. | |
| */ | |
| Alpine.magic('confirm', () => { | |
| return (message) => { | |
| return new Promise((resolve, reject) => { |
This file contains hidden or 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
| { | |
| "info": { | |
| "_postman_id": "b3e3e3e3-3e3e-3e3e-3e3e-3e3e3e3e3e3e", | |
| "name": "Sanity HTTP API (Complete + Patches)", | |
| "description": "Full collection for Sanity.io HTTP API including Query, Assets, and comprehensive Mutation/Patch examples.", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "Query", |
This file contains hidden or 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
| <?php | |
| function json_response($code = 200, $message = null) | |
| { | |
| // clear the old headers | |
| header_remove(); | |
| // set the actual code | |
| http_response_code($code); | |
| // set the header to make sure cache is forced | |
| header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |
This file contains hidden or 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
| // since the argument variable can only be referenced once, we need this function repeated | |
| fn ex::p($p) = $p->{"c":url.current}; | |
| fn ex::pp($p) = $p->{"c": ex::p(parentPage).c}; | |
| fn ex::ppp($p) = $p->{"c": ex::pp(parentPage).c}; | |
| // will output `level-4/level-3/level-2/level-1` | |
| // usage: { "href": ex::slug(@) } | |
| fn ex::slug($d) = $d{"slug":array::join( | |
| array::compact([ | |
| ex::ppp(parentPage).c, | |
| ex::pp(parentPage).c, |
This file contains hidden or 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
| /* @see https://thecascade.dev/article/least-amount-of-css/ */ | |
| html { | |
| color-scheme: light dark; | |
| } | |
| body { | |
| font-family: system-ui; | |
| font-size: 1.25rem; | |
| line-height: 1.5; | |
| } |
This file contains hidden or 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
| /path/to/chrome --headless \ | |
| --disable-gpu \ | |
| --no-pdf-header-footer \ | |
| --hide-scrollbars \ | |
| --print-to-pdf-margins="0,0,0,0" \ | |
| --print-to-pdf \ | |
| --window-size=1280,720 \ | |
| https://example.com |
This file contains hidden or 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
Show hidden characters
| [ | |
| // press $ when selecting text to wrap it in blade echo tags and a variable | |
| { | |
| "keys": [ | |
| "$" | |
| ], | |
| "command": "insert_snippet", | |
| "args": { | |
| "contents": "{{ \\$${0:$SELECTION} }}" | |
| }, |
This file contains hidden or 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
| -- Returns the Levenshtein distance between the two given strings | |
| -- Lower numbers are better | |
| local function levenshtein(str1, str2) | |
| local len1 = #str1 | |
| local len2 = #str2 | |
| local matrix = {} | |
| local cost = 1 | |
| local min = math.min; | |
| -- quick cut-offs to save time |
This file contains hidden or 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
| { | |
| "ti": "AAAABBBBCCCCDDDD_ZZZ", | |
| "cn": "Example ION File", | |
| "dt": "11", | |
| "ci": "AAAABBBBCCCCDDDD_ZZZ~fioUStyk923dTK4y7iXdBwVjTBYEunBtd9GpEigvBf9", | |
| "cs": "gkBdyWByfHiOwteD-vQn9jb7pudublgsI9kW4fiPhzsOi2lFKIttCzy5ofiiyMQqgSjpuS3GRDtMHbLbj_fexq", | |
| "iu": "https://mingle-ionapi.inforcloudsuite.com", | |
| "pu": "https://mingle-sso.inforcloudsuite.com:443/AAAABBBBCCCCDDDD_ZZZ/as/", | |
| "oa": "authorization.oauth2", | |
| "ot": "token.oauth2", |
NewerOlder