Skip to content

Instantly share code, notes, and snippets.

View ghabxph's full-sized avatar

ガビーくん ghabxph

View GitHub Profile
@ghabxph
ghabxph / DynamicDependencyProvider.php
Created June 16, 2021 06:04
Class responsible for dynamically providing classes. Inspired from Laravel app()->make() class provider
<?php
/**
* Class responsible for dynamically providing classes.
* - Inspired from Laravel app()->make() class provider
*
* @author Gabriel Lucernas Pascual <me@ghabxph.info>
* @since 2018.07.23
*/
class DynamicDependencyProvider
@ghabxph
ghabxph / consul.md
Last active November 9, 2020 02:38
consul.md

Consul

Commands

  • consul members
  • consul catalog
  • consul catalog nodes
  • consul catalog services

Questions

Summary of tools I developed for the general public

These are the tools that I would like to share to the world. I will keep this page updated, so please keep this in your bookmark page.

This is also the corresponding FB Page of this page. You might book it mark as well: FB Link

In the nearer future, I will make my website functional. Right as of the moment, I am still on the process of developing it.

April 13 2020 - Monday

Time Ping Download Upload Result
4/13/2020 05:41 AM 32 26.60 13.66 https://www.speedtest.net/result/9274126262
4/13/2020 05:47 AM 30 25.93 12.68 https://www.speedtest.net/result/9274139420
4/13/2020 06:25 AM 32 12.69 09.74 https://www.speedtest.net/result/9274224256
4/13/2020 07:40 AM 27 17.68 23.19 https://www.speedtest.net/result/9274381989
4/13/2020 09:07 AM 36 10.62 11.36 https://www.speedtest.net/result/9274558330
4/13/2020 09:25 AM 25 2.76 20.74 https://www.speedtest.net/result/9274596069
4/13/2020 10:03 AM 39 5.45 16.09 https://www.speedtest.net/result/9274678603

You already got the answer?

https://tinyurl.com/nice-problem-xxx

Replace xxx as your solution. Keep the answer to yourself.

The problem

682 - One digit is right and in its place
614 - One digit is right but in the wrong place
206 - Two digits are right, but both are in the wrong place
@ghabxph
ghabxph / nice-problem-042.md
Last active March 29, 2020 12:01
Nice anti-boredom problem. And I'm bored, so I wrote this page. Shhh.

The problem

682 - One digit is right and in its place
614 - One digit is right but in the wrong place
206 - Two digits are right, but both are in the wrong place
738 - All digits are wrong
380 - One digit is right, but in the wrong place

My conclusion: 042 How?

Statement #4 gives us nice eliminations.

@ghabxph
ghabxph / create-your-own-root-certificate-authority.txt
Last active October 30, 2018 23:19
Create your own Root Certificate Authority
Credits:
https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development
Create key first
openssl genrsa -des3 -out myCA.key 2048
Create your first root CA
openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
Create a CA signed certificates for your dev sites
@ghabxph
ghabxph / sigmoid.cpp
Last active January 7, 2018 12:43
Sigmoid Function
/**
* Copyright 2017 ghabxph(c)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
@ghabxph
ghabxph / file-search.php
Last active December 11, 2017 02:16
File Searcher
<?php
define('DS', DIRECTORY_SEPARATOR);
class FileSearcher
{
private $sRootPath;
private $aPhpFiles = [];
public function __construct($sRootPath)
{
$this->sRootPath = $sRootPath;
}
@ghabxph
ghabxph / toggler.js
Last active September 29, 2017 08:17
General purpose toggler
/**
* Toggler
* @author Gabriel Lucernas Pascual <me@ghabpxh.info>
* @license MIT
* @link https://gist.github.com/ghabxph/ed4c14fe6b2a45737fb7fa2b5c947114
*/
$(function(){
/**
* Waits for .toggler element to be clicked