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
function get_cached_external_json($url) { | |
$transient_key = 'our_fetched_json_' . md5($url); | |
$option_key = 'our_fetched_json_backup_' . md5($url); | |
$cached_data = get_transient($transient_key); | |
if (false !== $cached_data) { | |
return $cached_data; | |
} |
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 | |
# Function to start the services | |
start_services() { | |
echo "Starting Apache2 and MySQL..." | |
sudo systemctl start apache2 | |
sudo systemctl start mysql | |
echo "Apache2 and MySQL started." | |
} |
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
# Gist: install_wordpress.sh | |
## Description | |
This script automates the process of setting up a new WordPress site on a server. It performs the following tasks: | |
1. Checks if a site name is provided as an argument. | |
2. Creates a MySQL database and user for the new site. | |
3. Sets up the web root directory. | |
4. Downloads and installs WordPress. | |
5. Configures the `wp-config.php` file with database details and security salts. | |
6. Configures Apache to serve the new WordPress site. |
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
{ | |
"editor.fontFamily": "JetBrainsMono Nerd Font Propo, FiraCode Nerd Font, Cascadia Mono NF, monospace", | |
"editor.fontSize": 16, | |
"editor.fontLigatures": true, | |
"editor.lineHeight": 30, | |
"editor.tabSize": 2, | |
"editor.minimap.enabled": false, | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true, | |
"editor.formatOnPaste": true, |
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
{ | |
"en": [ | |
"Programming is the art of instructing a computer to perform a task.", | |
"In the world of coding, algorithms are the building blocks of solutions.", | |
"A programming language is like a set of tools that developers use to create software.", | |
"Debugging is a crucial skill; finding and fixing errors is part of the coding process.", | |
"Object-oriented programming promotes code reusability and modular design.", | |
"Version control systems like Git help teams collaborate on software projects seamlessly.", | |
"Learning to code is not just about syntax; it's about problem-solving and logical thinking.", | |
"Web development involves creating websites and web applications using various technologies.", |