Skip to content

Instantly share code, notes, and snippets.

View rafaelpatro's full-sized avatar

Rafael Patro rafaelpatro

  • Lisbon, Portugal
View GitHub Profile
@erikhansen
erikhansen / README.md
Last active August 15, 2023 09:21
Running Warden on Windows with WSL 1 & 2

Running Warden on Windows with WSL 2

See this Github comment thread for any issues or additional context for getting Warden running on Windows with WSL 2.

The instructions below cover how to install Warden on Windows, using WSL 2.

  1. Install Ubuntu 20 LTS in WSL 2
    1. To access the shell/terminal inside of Ubuntu WSL, open the Ubuntu 20.04 program that will have been installed in the step above (If you want to be able to copy/paste, see here. Going forward, this article assumes you will run all commands inside of the Ubuntu terminal
  2. Install Docker Desktop (these instructions were tested using Docker 4.9.0 on June 13th, 2022)
  3. Install homebrew `
@GAS85
GAS85 / http2_apache2_ubuntu18.04.md
Last active September 29, 2023 12:00
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 18.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 18.04 running Apache 2.4.xx.
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.

Step 1: Install Apache2

@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 20, 2024 14:39
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@CajuCLC
CajuCLC / magento_crawler.sh
Created June 5, 2018 17:42
Magento Crawler
#!/bin/bash
URL='domain.com'
wget --quiet http://$URL/sitemap.xml --no-cache --output-document - | egrep -o "http://$URL[^<]+" | while read line; do
time curl -A 'Cache Warmer' -s -L $line > /dev/null 2>&1
echo $line
done
@GAS85
GAS85 / http2_apache2_ubuntu16.04.md
Last active February 7, 2023 16:17
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@inecmc
inecmc / notes.md
Created August 4, 2017 08:06
How to run multiple Redis instances on Ubuntu 16.04

Create the directory for the new instance

$ sudo install -o redis -g redis -d /var/lib/redis2

Create a new configuration file

$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
@RonnyO
RonnyO / jquery.qDefer.min.js
Created April 15, 2012 11:24
Simply mimic the 'defer' attribute for inline scripts across all browsers (jQuery helper)
// http://bit.ly/qDefer
$(function(){$('script[type="text/javascript/defer"]').each(function(){$(this).clone().attr('type','').insertAfter(this)})});
@eligrey
eligrey / html-domparser.js
Last active April 11, 2024 10:34
DOMParser HTML extension - Now a polyfill since HTML parsing was added to the DOMParser specification
/*
* DOMParser HTML extension
* 2019-11-13
*
* By Eli Grey, http://eligrey.com
* Public domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/*! @source https://gist.github.com/1129031 */