Skip to content

Instantly share code, notes, and snippets.

View jandaryl's full-sized avatar
💼
Working

Jan Daryl Galbo jandaryl

💼
Working
  • Philippines
View GitHub Profile
@jandaryl
jandaryl / open_source_church_software.md
Created July 5, 2019 14:11 — forked from seven1m/open_source_church_software.md
List of Open Source Church Software
@jandaryl
jandaryl / bookmark.min.js
Created January 28, 2019 04:54 — forked from zaydek-old/bookmark.min.js
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@jandaryl
jandaryl / xmapp-replacing-mariadb-with-mysql.md
Created October 24, 2018 00:15 — forked from odan/xmapp-replacing-mariadb-with-mysql.md
XAMPP - Replacing MariaDB with MySQL

XAMPP - Replacing MariaDB with MySQL

As of XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. MariaDB is not 100% compatible with MySQL and can be replaced with the "orginal" MySQL server.

Requirements

  • Windows
  • XAMPP for Windows
  • Administrator privileges to restart Windows services
@jandaryl
jandaryl / search_model.php
Created October 1, 2018 12:39 — forked from jamierumbelow/search_model.php
A quick multi-table multi-field search model for CI / PHP
<?php
class Search_model extends CI_Model
{
protected $tables = array(
'users' => array( 'name', 'email' )
);
public function run($search)
{
@jandaryl
jandaryl / README-Template.md
Created September 28, 2018 13:00 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jandaryl
jandaryl / sql-log.md
Created September 28, 2018 00:35
Easy way to log all SQL queries in Laravel Application

Easy way to log all SQL queries in Laravel Application

Every developer, when working on a project, start at some point wandering about the performances of his application. In the Laravel world, the most frequent question you may have is "are my sql queries fast enough ?". If Eloquent is doing a great job optimizing your queries, sometines it's not enough.

If you want to analyze the SQL queries of your application, behind Eloquent, you then need some tool to log all the executed queries. Laravel Debugbar is a great tool for that and it will help you lat.

For some projects however, you don't especially want to setup the Laravel Debugbar package. In this case, how can you log SQL queries ?

There is a simple snippet that you can add in the AppServiceProvider that will help you quite a lot.

@jandaryl
jandaryl / git-tricks.md
Last active September 27, 2018 23:59
Remember Your Git Credentials Forever

Tired of always having to type your login and password when executing git pull on your server? So do I.

Here's an helper command that will remember your credentials so you don't have to type anything than your pull command.

This is particularly helpful when you are using a deployment pipeline that will ssh onto your server and execute a git pull command.

Here's the magic helper:

git config credential.helper store

@jandaryl
jandaryl / Laravel-Container.md
Created September 17, 2018 14:04
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).