- 🔒 Secure SSH configuration
- 🐍 Python environment with deadsnakes PPA
- 🚀 Nginx with UI management
- 🐳 Docker and Docker Compose
- 🔑 SSL/TLS with Let's Encrypt
- 📊 MongoDB Atlas integration
- 💾 Swap and system optimization
- 🔄 Auto-renewal and maintenance scripts
- ⏰ Custom MOTD with system stats
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/bash | |
| # CWP - Custom backup script | |
| # Modified for external Amazon S3 buckets | |
| # based on a backup script by ejsolutions/Teo/cynique | |
| # | |
| # Set the following 3 items to suit | |
| tmp_dir=/home/backups_tmp/ | |
| s3_bucket=YOUR-BUCKET-NAME-HERE | |
| retention=1 | |
| # ------------------- |
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
| { | |
| "terminal.integrated.profiles.windows": { | |
| "PowerShell": { | |
| "source": "PowerShell", | |
| "icon": "terminal-powershell" | |
| }, | |
| "Command Prompt": { | |
| "path": [ | |
| "${env:windir}\\Sysnative\\cmd.exe", | |
| "${env:windir}\\System32\\cmd.exe" |
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) function to get KV variables | |
| const _ENV = () => [replace-with-namespace-name].get('_ENV'); | |
| let ENV={}; | |
| // (2) listen for a request | |
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| // (3) function to log to LOGDNA |
This Gist shows how to add a sortable Views column to the post/page/custom-post-type edit screen.
Out of the box, the script will display the Views column on both the Posts and Pages screens. You can change that by editing the $post_types_with_views_column array at the beginning of the script.
- Using the text editor of your preference, create a file called
wpp-sortable-columns.phpand add the contents of this script to it. - Place the
wpp-sortable-columns.phpfile inwp-content\plugins.
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
| /* ------------------------------------ | |
| /* CUSTOM FONTS | |
| /* ------------------------------------ */ | |
| /* ELEMENTOR */ | |
| function modify_controls( $controls_registry ) { | |
| // First we get the fonts setting of the font control | |
| $fonts = $controls_registry->get_control( 'font' )->get_settings( 'options' ); | |
| // Then we append the custom font family in the list of the fonts we retrieved in the previous step | |
| $new_fonts = array_merge( [ 'Biotif' => 'system' ], $fonts ); |
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
| sudo su | |
| //Setup Hostname | |
| hostnamectl set-hostname subdomain.domain.tld | |
| ## Basic | |
| sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get autoremove -y && sudo apt-get install software-properties-common | |
| //Setup SWAP | |
| sudo fallocate -l 1G /swapfile; | |
| ls -lh /swapfile; |
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 | |
| add_hook('AdminLogin', 1, function($vars) { | |
| $_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp; | |
| }); | |
| add_hook('AdminAreaHeadOutput', 1, function($vars) { | |
| $_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp; | |
| return ' | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ |
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
| for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done |
NewerOlder
