Skip to content

Instantly share code, notes, and snippets.

View bkintanar's full-sized avatar
🏡
Remotely working

Bertrand Kintanar bkintanar

🏡
Remotely working
View GitHub Profile
@bkintanar
bkintanar / ssh.sh
Created February 10, 2023 09:05 — forked from zircote/ssh.sh
Convert a AWS PEM into a ssh pub key
ssh-keygen -y -f private_key1.pem > public_key1.pub
@bkintanar
bkintanar / 2020_03_16_093453_create_employee_fields_table.php
Created April 2, 2020 13:19
2020_03_16_093453_create_employee_fields_table
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmployeeFieldsTable extends Migration
{
/**
* Run the migrations.
@bkintanar
bkintanar / regions
Created December 5, 2019 02:08
GET /api/regions
{
"data": [
{
"code": "010000000",
"name": "REGION I (ILOCOS REGION)",
"population": 5026128
},
{
"code": "020000000",
"name": "REGION II (CAGAYAN VALLEY)",
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
server {
location / {
root /var/www/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
root /var/www/public;

Nginx SSL via Let's Encrypt and acme.sh

This guide is intended to walk you through installation of a valid SSL on your server for your site at example.com. This example is using root user, you may need to use sudo if you encounter problems such as write permissions.

Pre-requisites

  • Install acme.sh on your server. This will create a acme.sh folder in your home directory and more importantly create an everyday cron job to check and renew certificates if needed.
  • Install nginx server (different per distibution so just make sure you have it up and running)
<?php
// Controller:
$employee = $this->employee->getEmployeeById($employee_id);
// Model:
public function getEmployeeById($employee_id)
{
@bkintanar
bkintanar / gist:03f2df8497d66af55065
Last active January 19, 2016 03:05
Bertrand Kintanar CV

Bertrand Son Kintanar

#####Judge Pedro Son Compound, Miñoza St, #####Talamban Cebu City, Cebu 6000, Philippines #####T: +63 949 704 7136 E: [bertrand.kintanar@gmail.com]

Personal Profile

  • Punctual, relialble, calm under pressure, and trustworthy
  • Well traveled (Bahrain, China, Egypt, HongKong, Saudi Arabia, and Switzerland)