Ryan Fitton
BlogTagsPortfolioAbout

Code Snippets

Tags

All Posts
  • development (57)
  • code-snippets (47)
  • uncategorized (27)
  • design (15)
  • photos (6)
  • video-talks (4)
  • personal (1)
  • Published on
    11 March 2018

    VestaCP API firewall suspend and unsuspend bash script

    • Development
    • Code-Snippets
    VestaCP offers an API which allows the firewall rules to be changed, but I could only find examples which use PHP and cURL and I required a script which would work as a Bash script. I’ve created a script below which you’re free to use. Ensure your host URL, admin username and password are correct ...
  • Published on
    14 February 2018

    Steps to safely remove Linux kernels (Ubuntu)

    • Code-Snippets
    Note: Please understand, these instructions can make your system non-bootable. If you’re unsure, do not continue. If you’re trying to update the kernel and low/empty disk space errors are shown, it’s probably because the /boot/ directory is full. Use this command to see the available space of /boot/: sudo df -h Now check the kernel ...
  • Published on
    3 February 2018

    Multiple videos using the YouTube API within a Bootstrap 3.3.7 carousel slider

    • Development
    • Code-Snippets
    This is an example of how to use the YouTube API with multiple videos within a Bootstrap carousel. I have added Play/Pause functionality to a custom button and added the ability for the videos to be paused when the carousel is transitioned. A CodePen is attached below to see the example in action, and the ...
  • Published on
    12 January 2018

    Test your system for Spectre and Meltdown vulnerabilities

    • Code-Snippets
    Following the outbreak of three processor vulnerabilities, known as Spectre and Meltdown; I have already patched my systems and whilst doing so, came across this useful script written by Speed47. This script checks your system for the three vulnerabilities. I found it useful to check my systems were secure after applying kernel updates. To run ...
  • Published on
    5 January 2018

    PHP: Finding a multi-dimensional array key’s associated value

    • Development
    • Code-Snippets
    I thought I would share this simple PHP function to hopefully help anyone needing a quick solution...
Previous4 of 10Next
mailMailbuymeacoffeeBuyMeACoffeegithubGithubkeybaseKeybaselinkedinLinkedinxXfacebookFacebookyoutubeYoutubemastodonMastodonblueskyBlueskythreadsThreadsinstagramInstagram
AboutColophonPoliciesLinksRSS FeedStatus
© 2025 Ryan Fitton