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 | |
# | |
# r/place clone written in a single PHP file. | |
# Written by Axcelott--Unlicensed. | |
# | |
define('DIMENSIONS', 20); | |
define('CANVAS_COLOR', "#ffffff"); | |
define('PENCIL_COLOR', "#000000"); |
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
@import url("/assets/css/app.min.css"); | |
:root { | |
--font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
--body-color:#333; | |
--body-background:#fff; | |
--hr-border-color:#ccc; | |
--title-color:#333; | |
--link-color:#3366CC; | |
--link-focus-color:red; | |
--link-hover-color:#333; |
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
{ | |
"description": "Option launches Spotlight", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_option", | |
"modifiers": { "optional": ["any"] } | |
}, | |
"to": [{ "key_code": "left_option" }], | |
"to_if_alone": [ |
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 | |
function in($query, $column, $list) { | |
[$sql, $params] = $query; | |
$placeholders = implode(',', array_fill(0, count($list), '?')); | |
return ["SELECT * FROM ($sql) WHERE `$column` IN $placeholders", array_merge($params, $list)]; | |
} | |
function where($query, $column, $value) { | |
[$sql, $params] = $query; |
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
{ | |
"description": "option+t launches alacritty", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "return_or_enter", | |
"modifiers": { "mandatory": ["left_option"] } | |
}, | |
"to": [{ "shell_command": "osascript -e 'tell app \"iTerm2\"' -e 'create window with default profile' -e activate -e end" }], | |
"type": "basic" |
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
#!/usr/bin/env -S bun | |
import crypto from "node:crypto"; | |
import puppeteer from "puppeteer"; | |
const RANDOM_BYTES = 32; | |
const CLIENT_ID = "D50E0C06-32D1-4B41-A137-A9A850C892C2"; | |
const SCOPE = "openid"; | |
const APP = "somtodayleerling" | |
const ENDPOINT = "https://inloggen.somtoday.nl/oauth2"; |
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
function establish_connection() { | |
$host = DB_HOST; | |
$user = DB_USER; | |
$pass = DB_PASS; | |
$name = DB_NAME; | |
$options = [ | |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | |
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, | |
PDO::ATTR_EMULATE_PREPARES => false, |
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
body {background: antiquewhite !important} | |
.top {background: #d53e65 !important;} | |
nav .links {background: #eda7ab !important;} | |
nav .links a {text-shadow: 0 0 7px #e77b97 !important} | |
nav .links a:hover {color: #d53e65 !important;} | |
main {background: #fff5eb !important;} | |
.blog-preview {display:none} | |
.profile-pic img {border: 5px solid #d53e65; border-radius: 4px;} | |
footer {background: #f3e3ce !important;} | |
.profile .heading {background: #a32848 !important;color:white !important;} |
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
{ | |
"description": "Option+Q to Command+Q", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "q", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], |
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
{ | |
"description": "Option+Return launches Alacritty", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "return_or_enter", | |
"modifiers": { | |
"mandatory": [ | |
"left_option" | |
], |
NewerOlder