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
<?php | |
$response = (object) []; | |
$json = json_decode(file_get_contents('php://input')); | |
//... | |
if (!$json) { | |
$response->state = [ | |
'code' => 400, |
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
format = """ | |
$directory\ | |
[](fg:#4f46e5 bg:#4338ca)\ | |
$git_branch\ | |
$git_status\ | |
[](fg:#4338ca bg:#3730a3)\ | |
$nodejs\ | |
$rust\ | |
$golang\ | |
$php\ |
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
/** | |
* @param {object} night Configure night mode controls and targets. | |
* @param {string} night.mount Mount theme class to single given DOM element. | |
* @param {string} night.targets Match control targets using `querySelectorAll()`. | |
* @param {string} [night.theme] Set optional theme name to be mounted. Default: night. | |
* @param {function} [night.callback] Optional callback triggered on target interaction. | |
* @return {object} Current theme state and targeted DOM elements. | |
*/ | |
const night = ({ mount, targets, theme = "night", callback }) => { |
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
const rasterGlobe = (limit = 1000, x1 = -180, y1 = -180) => { | |
type Coordinates = { x: number; y: number }; | |
let base = Math.pow(limit, 1 / 2); | |
let root = Math.floor(base); | |
let data: Array<Coordinates> = []; | |
const rasterLine = (x2: number) => { | |
for (let i = 0; i < root; i++) { | |
let y = y1 + ((y1 * -2) / (root - 1)) * i; |
NewerOlder