Skip to content

Instantly share code, notes, and snippets.

View DavidTrujillo's full-sized avatar
🏠
Working from home

David DavidTrujillo

🏠
Working from home
View GitHub Profile
@gengue
gengue / Caddyfile
Created August 1, 2020 07:32
Caddy server automatic HTTPS for localhost - API + frontend using reverse proxy
# https://medium.com/@devahmedshendy/traditional-setup-run-local-development-over-https-using-caddy-964884e75232
# 1. sudo pacman -S mkcert
# 2. mkdir ./certs && cd ./certs
# 3. mkcert "*.sqila.local"
# 4. new line /etc/hosts/ -> 127.0.0.1 backend.sqila.local app.sqila.local
backend.sqila.local {
tls ./certs/_wildcard.sqila.local.pem ./certs/_wildcard.sqila.local-key.pem
reverse_proxy localhost:1337 {
header_up Host {host}
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import sys
def print_same_line(text):
sys.stdout.write('\r')
sys.stdout.flush()
@CarterZhou
CarterZhou / pipeline-of-installing-and-testing-laravel-application
Last active March 28, 2024 17:05
This is a sample script of installing and testing a Laravel application using Jenkins pipeline
node {
stage('download') {
git branch: 'master', url: 'github/url/to/your/project'
}
stage('install') {
sh 'composer install'
}
stage('init') {
sh 'cp .env.example .env'
sh 'php artisan key:generate'
@CarterZhou
CarterZhou / jenkins-installation-and-setup
Created May 26, 2017 07:21
Script to install and secure Jenkins
# Install Jenkins
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install -y jenkins ant
# Configure a reverse proxy on Nginx to secure Jenkins
server {
listen 443 ssl;
listen [::]:443;
@sumardi
sumardi / nginx.default.conf
Last active November 2, 2024 14:29
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \