Skip to content

Instantly share code, notes, and snippets.

View lucasmartins1994's full-sized avatar

Lucas Martins de Souza lucasmartins1994

View GitHub Profile
function url($url) {
var url = $url.split( '//' );
if (url[0] === "http:" || url[0] === "https:") {
var protocol = url[0] + "//";
var host = url[1].split( '/' )[0];
url = protocol + host;
var path = $url.split(url)[1];
return {
protocol: protocol,
host: host,
@lucasmartins1994
lucasmartins1994 / cloudSettings
Created April 4, 2021 02:26
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-04T02:26:43.048Z","extensionVersion":"v3.4.3"}
@lucasmartins1994
lucasmartins1994 / rspecSnippet
Created July 17, 2020 18:57
Snippet for rspec acceptance
{
"rspecAcceptance": {
"scope": "ruby",
"prefix": "rspecAcceptance",
"body": [
"# frozen_string_literal: true",
"",
"require('acceptance_helper')",
"",
"resource '$1' do # rubocop:disable Metrics/BlockLength",
@lucasmartins1994
lucasmartins1994 / README.me
Created May 17, 2018 19:40 — forked from NandoSangenetto/README.me
Compress and convert images
# Convert images from folder
## Installation
You need to download libwebp and put in the shell script folder.
You must have installed the jpegoptim, giflossy (gifsicle), pngquant and imagemagick library.
## Usage
Convert folder and put results in the results folder
@lucasmartins1994
lucasmartins1994 / ApacheHTTPSConfig.md
Created March 29, 2018 20:46 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys: