Skip to content

Instantly share code, notes, and snippets.

View rcdelfin's full-sized avatar
:octocat:

Raymund C. Delfin rcdelfin

:octocat:
View GitHub Profile
@rcdelfin
rcdelfin / pint.json
Created April 27, 2025 09:24 — forked from Haythamasalama/pint.json
PHP CS Fixer Rules - Laravel Pint
{
"preset": "laravel",
"rules": {
"array_indentation": true,
"array_syntax": {
"syntax": "short"
},
"binary_operator_spaces": {
"default": "single_space"
},
@rcdelfin
rcdelfin / app.js
Created April 12, 2021 01:53 — forked from echr/app.js
Simple Laravel + Vue + Laravel Mix + Firebase Notification (PWA, Offline)
// FILE PATH: /resources/js/app.js
require('./bootstrap');
// Import Service Worker Registry
require('./extensions/sw-registry');
import Vue from 'vue';
...
@rcdelfin
rcdelfin / php-pools.md
Created February 17, 2021 23:51 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@rcdelfin
rcdelfin / init.vim
Created October 29, 2020 23:54 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@rcdelfin
rcdelfin / homestead-manual-install.md
Created December 9, 2018 09:59 — forked from idecardo/homestead-manual-install.md
Laravel Homestead Manual Installation

Getting Started

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine. Read more...

Download

Download homestead box:

@rcdelfin
rcdelfin / rancher2customnodecmd.sh
Last active September 28, 2018 11:59 — forked from superseb/rancher2customnodecmd.sh
Add custom node to Rancher 2.0 (from v2.0.0-alpha26 and up)
#!/bin/bash
docker run -d -p 80:80 -p 443:443 --name rancher-server rancher/rancher:latest
while ! curl -k https://localhost/ping; do sleep 3; done
# Login
LOGINRESPONSE=`curl -s 'https://127.0.0.1/v3-public/localProviders/local?action=login' -H 'content-type: application/json' --data-binary '{"username":"admin","password":"admin"}' --insecure`
LOGINTOKEN=`echo $LOGINRESPONSE | jq -r .token`
# Change password
@rcdelfin
rcdelfin / gist:3c3321b72a325ea58aab777a1681f05f
Created October 17, 2017 07:09 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@rcdelfin
rcdelfin / import_csv_to_mongo
Created February 1, 2017 17:39 — forked from mprajwala/import_csv_to_mongo
Store CSV data into mongodb using python pandas
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)
@rcdelfin
rcdelfin / cloud-config-master.yaml
Created November 9, 2016 11:19 — forked from ryancurrah/cloud-config-master.yaml
CoreOS w/ Kubernetes Cloud Config
#cloud-config
#type: master
---
hostname: master01
users:
- name: core
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe.
groups:
- sudo
{
"name": "Virtually Replaced Tool",
"version": "1.1.6",
"manifest_version": 2,
"description": "VirtuallyReplaced Extension",
"homepage_url": "https://virtuallyreplaced.com/",
"icons": {
"16": "assets/icons/icon16.png",
"48": "assets/icons/icon48.png",
"128": "assets/icons/icon128.png"