⌥ Option ⌃ Control ⇧ Shift ⌘ Command ⎋ Escape ⇪ Caps lock ⇥ Tab ⏏︎ Eject ⌫ Delete
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
name: Build & deploy website | |
on: | |
push: | |
branches: [master, main] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
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 | |
// build an inverted index | |
// https://en.m.wikipedia.org/wiki/Inverted_index | |
function buildInvertedIndex(array $filenames): array | |
{ | |
$invertedIndex = []; | |
foreach($filenames as $filename) { | |
$data = file_get_contents($filename); |
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
<div class="w-14 h-8"> | |
<input type="checkbox" id="dark-mode-toggle" class="hidden" onchange="document.documentElement.classList.toggle('dark')" /> | |
<label for="dark-mode-toggle" class="w-full h-full bg-gray-800 dark:bg-white rounded-full p-1 flex justify-between cursor-pointer"> | |
<span class="inline dark:hidden">🌞</span> | |
<span class="w-6 h-6 rounded-full bg-white dark:bg-gray-800 block float-right dark:float-left"></span> | |
<span class="hidden dark:inline">🌛</span> | |
</label> | |
</div> |
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
{ | |
"require": { | |
"symfony/translation": "^5.0", | |
"symfony/twig-bridge": "^5.0", | |
"symfony/yaml" : "^5.0", | |
"twig/twig": "^3.0" | |
} | |
} |
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
# What this script do? | |
# 1. install Cecil if `cecil.phar` is not found (force a specific version with `CECIL_VERSION`) | |
# 2. install Composer if `composer.phar` is not found | |
# 3. install theme(s) if `composer.json` is found | |
# 4. run `php cecil.phar build -v` | |
if [ ! -f "./cecil.phar" ]; then | |
echo "Downloading Cecil" | |
if [ -z $CECIL_VERSION ]; then | |
curl -sSOL https://cecil.app/cecil.phar |
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 | |
/** | |
* This file is part of the Cecil/Cecil package. | |
* | |
* Copyright (c) Arnaud Ligny <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
/** | |
* This file is part of the Cecil/Cecil package. | |
* | |
* Copyright (c) Arnaud Ligny <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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
# https://ttv-ublock.vercel.app/twitch-videoad.js | |
const origFetch = window.fetch; | |
window.fetch = (url, init, ...args) => { | |
if (typeof url === "string") { | |
if (url.includes("/access_token")) { | |
// url = url.replace("player_type=site", "player_type=site"); | |
} else if ( | |
url.includes("/gql") && | |
init && | |
typeof init.body === "string" && |
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
#!/bin/bash -e | |
USER_NAME="Build Bot" | |
USER_EMAIL="[email protected]" | |
REPOSITORY="username/repository" | |
TARGET_BRANCH="gh-pages" | |
SITE_DIR="_site" | |
echo "Started deploy to $REPOSITORY/$TARGET_BRANCH" |
NewerOlder