Skip to content

Instantly share code, notes, and snippets.

View gaibz's full-sized avatar
💭
too much deadline

Herlangga Sefani gaibz

💭
too much deadline
  • under the sky, above the ground
View GitHub Profile
@gaibz
gaibz / common_helper.php
Created February 15, 2020 04:00
Common Helper for Codeigniter4
<?php
/**
* I made this file just for make things easier in Codeigniter 4
* Codeigniter4 is also support this function by default, but i don't know it feels like i need to make my own
*
*
* @package Gaibz_Helper
* @subpackage Helper
* @category Helper
* @author Herlangga Sefani Wijaya <https://github.com/gaibz> | 6 Feb 2020
@gaibz
gaibz / php.json
Created February 7, 2020 09:19
VSC PHP Snippet from mac
{
// Place your snippets for php here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@gaibz
gaibz / request_helper.php
Created February 6, 2020 04:40
CodeIgniter 3 request Helper [GET | POST | REQUEST | SERVER]
<?php
/**
* I made this file just for make things easier
*
* Sometimes I just dont like how CI Input Class works. $this->input->[method] is just too long for me
* So, with this helper it could be simple just see @example
* And this helper also have function for output JSON ..
*
* @example $username = request("username","POST");
* // it will empty if the request variable is not set
@gaibz
gaibz / db.js
Last active May 5, 2021 07:34
NeDB Encryption & Decryption (Work 2020)
/**
* NeDB With Encryption & Decryption
* Last Update 12 Feb 2020
*
* @author : Herlangga Sefani Wijaya <https://github.com/gaibz>
*/
const path = require('path') // path for database
const Datastore = require("nedb") // of course you need NeDB
const crypto = require('crypto') // now is in node default module