Skip to content

Instantly share code, notes, and snippets.

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

Ahmad aginanjar

🏠
Working from home
View GitHub Profile
@mmartinjoo
mmartinjoo / devops-with-laravel-toc.md
Last active December 3, 2023 10:21
DevOps with Laravel Table of Contents
View devops-with-laravel-toc.md

Topics coming in the next edition:

  • ✅ Load balancers from scratch (published on 10th of October)
  • ✅ Terraform (published on 12th of November)
  • HELM

Fundamentals - 208 pages (Basic package)

Building a pipeline

nginx

  • Serving static content
  • CGI, FastCGI, php-fpm
@aedorado
aedorado / docker-compose.yml
Created December 6, 2020 16:24
Docker compose file for ELK 7.9.2
View docker-compose.yml
version: '3.7'
services:
elasticsearch:
image: elasticsearch:7.9.2
ports:
- '9200:9200'
environment:
- discovery.type=single-node
ulimits:
@joseluisq
joseluisq / README.md
Last active September 12, 2023 06:58
Install PHP 7 Xdebug in Arch Linux
View README.md

Install PHP 7 Xdebug in Arch Linux

"Normally", these instructions should be also valid (in similar way) for other Linux distros.

1.- Install Xdebug using pacman:

sudo pacman -Sy xdebug
@drewjbartlett
drewjbartlett / Kernel.php
Last active August 18, 2017 03:59
Laravel ModelMake Command with custom namespace and table option
View Kernel.php
// app/Console/Kernel.php
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
@geraldvillorente
geraldvillorente / import.md
Created June 14, 2017 05:03
How to import database in MySQL in Docker?
View import.md

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

@hassanazimi
hassanazimi / _Laravel_Queue_Supervisor_Instruction.md
Last active November 15, 2022 14:42 — forked from danharper/a.md
Laravel Queue Supervisor
View _Laravel_Queue_Supervisor_Instruction.md

Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.

In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.

@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages
View useHexo.md
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active November 27, 2023 14:46
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2020.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@diegonobre
diegonobre / symfony3-rest-api.md
Last active June 22, 2022 19:22 — forked from tjamps/README.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
View symfony3-rest-api.md

Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authenticationu
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :

@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup
View osx-10.11-setup.md

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.