Skip to content

Instantly share code, notes, and snippets.

View leonardostefani's full-sized avatar
💼
Ruby on Rails Sr

Łeonardo Stefani leonardostefani

💼
Ruby on Rails Sr
  • Ruby on Rails Sr
  • Sergipe, Brazil
View GitHub Profile
This file has been truncated, but you can view the full file.
[
{
"id": 1,
"name": "LJ SAO PAULO 02",
"initials": "LJ-SAO-02",
"code": "1008106",
"company_name": "DEL LOGISTIC COMERCIAL LTDA",
"status": "available",
"email": "dellogistic.sao@jadlog.com.br",
"note": null,
@leonardostefani
leonardostefani / !instructions.md
Last active March 6, 2021 16:32
Plesk - Installing Ruby 2.1 - 2021 Method
  1. Download & extract openssl-1.0.1h
cd /tmp
wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
tar -xzvf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
  1. Configure OpenSSL
@leonardostefani
leonardostefani / index.php
Last active November 28, 2020 16:48
Opencart SSL e Access Origin
if($_SERVER['HTTP_HOST'] == 'mercadogun.com' || $_SERVER['HTTP_HOST'] == 'www.mercadogun.com') {
echo('<center>Em breve!</center>');
die();
}
// Redireciona para https
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === "off") {
$location = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $location);
mkdir ~/bin
echo -e '\nPATH=/opt/cpanel/ea-php73/root/usr/bin:$PATH\n' >> ~/.bashrc
echo -e '\nPATH=~/bin:$PATH\n' >> ~/.bashrc
source ~/.bashrc
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=$(eval echo ~$USER)/bin --filename=composer
php -r "unlink('composer-setup.php');"
@leonardostefani
leonardostefani / nginx.sh
Last active October 22, 2017 21:14 — forked from mustafaturan/nginx
Nginx Starter Script
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid