Skip to content

Instantly share code, notes, and snippets.

View a-kbv's full-sized avatar

Atanas Korabov a-kbv

View GitHub Profile
@a-kbv
a-kbv / gist:5b98928b5358ae45602bf16a9be09963
Last active May 23, 2024 15:25
ubuntu/debian PHP version switcher
#!/bin/bash
# Ensure the script is not sourced
if [[ "$(basename -- "$0")" =~ ^(bash|sh)$ ]]; then
echo "Please run the script directly, not with 'source' or '.'"
return 1
fi
# Obtain the directory of the current script
SCRIPT_DIR="$(cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")" && pwd -P)"
cd "$SCRIPT_DIR"
@danieldogeanu
danieldogeanu / WampHTTPS.md
Last active April 22, 2025 23:13
How to enable HTTPS for WAMP Server.

After you've downloaded and installed WAMP Server, follow these steps:

  1. Generate SSL certificate using OpenSSL:
  • Add C:\wamp64\bin\apache\apache2.4.27\bin directory to the PATH so you can access openssl command from the command prompt (WAMP comes with its own version of OpenSSL already integrated, so you don't need to install it. You'll find it in this directory.).

    IMPORTANT: Please note that the path of your installation depends on your version of Apache! DO NOT copy and paste the paths presented in this gist as they will not match with yours!

  • Navigate to your user directory (C:\Users\%YOUR_USERNAME%\), create a new folder (.openssl), navigate to it with Powershell and run these commands:

    openssl genrsa -aes256 -out private.key 2048
    

openssl rsa -in private.key -out private.key

@deepakpk009
deepakpk009 / media.json
Created November 8, 2017 14:02
sample free video urls
{
"categories": [
{
"name": "Movies",
"videos": [
{
"description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],