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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # ============================================================ | |
| # OpenClaw "One file to rule it all" — FULL PURGE | |
| # Verified names/aliases: openclaw, clawdbot, moltbot | |
| # Related ecosystem name: moltbook | |
| # Verified folders: ~/.openclaw (incl. ~/.openclaw/openclaw.json, ~/.openclaw/workspace) | |
| # | |
| # macOS + Linux. Interactive. Idempotent. Conservative scanning. |
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
| // Execute with `node merge.js` | |
| // WARNING: This script does currently not support VariableReferences / variables in your text | |
| import fs from "node:fs" | |
| import path from "node:path" | |
| const inputDirectory = "./" // Replace with your actual directory path | |
| const outputFile = "messages.json" | |
| const messages = { |
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
| // takes either a unix time number, string or a Date object and returns time string | |
| export const timeAgo = (time: number | string | Date) => { | |
| switch (typeof time) { | |
| case "number": | |
| break; | |
| case "string": | |
| time = +new Date(time); | |
| break; | |
| case "object": |
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
| // Read this article for full understanding: https://de.serlo.org/mathe/45643/polarkoordinaten | |
| // We need two coordinates for this calculation: the cursor coordinate and midpoint coordinate. | |
| // How the sricpt works: | |
| // 1. It calculates the distance between the points | |
| // 2. It calculates the polar angle (in degree) | |
| // 3. If the coordinates are overlapping, it calculates the edge cases also. | |
| // It returns the polar angle as a number | |
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
| <!-- | |
| - 1. Preemptively warm up the fonts’ origin. | |
| - | |
| - 2. Initiate a high-priority, asynchronous fetch for the CSS file. Works in | |
| - most modern browsers. | |
| - | |
| - 3. Initiate a low-priority, asynchronous fetch that gets applied to the page | |
| - only after it’s arrived. Works in all browsers with JavaScript enabled. | |
| - | |
| - 4. In the unlikely event that a visitor has intentionally disabled |
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
| {% set age = date().diff(date(item.birthday)).y %} |
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
| # Drupal 8 | |
| # Turn off CSS aggregation | |
| drush -y config-set system.performance css.preprocess 0 | |
| # Turn on CSS aggregation | |
| drush -y config-set system.performance css.preprocess 1 | |
| # Turn off JS aggregation | |
| drush -y config-set system.performance js.preprocess 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
| # Drupal 7 | |
| # Turn on JS Aggregation | |
| drush vset preprocess_js 1 --yes | |
| # Turn off JS Aggregation | |
| drush vset preprocess_js 0 --yes | |
| # Turn on CSS Aggregation | |
| drush vset preprocess_css 1 --yes |
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
| # Ignore configuration files that may contain sensitive information. | |
| sites/*/*settings*.php | |
| # Ignore paths that contain generated content. | |
| files/ | |
| sites/*/files | |
| sites/*/private | |
| # Ignore default text files | |
| robots.txt |
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
| # Ignore configuration files that may contain sensitive information. | |
| */sites/*/settings*.php | |
| */sites/*/*.settings.php | |
| */sites/local.sites.php | |
| # Ignore paths that contain user-generated content. | |
| */sites/*/files | |
| */sites/*/private | |
| # Ignore editor specific files. |
NewerOlder