Skip to content

Instantly share code, notes, and snippets.

View fahmiegerton's full-sized avatar
🕳️
Hectic

Arif Fahmi fahmiegerton

🕳️
Hectic
View GitHub Profile
D88DDDD8888DDDDDDDDDDD88888888888888888888888888888888888888888888888888888888888888888888888888888888DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDDDDDDDD8888DDDDDDDDD88I
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888I
888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
$payload = `[
{
"id": 929,
"bank_id": "gCjM",
"account_number": 4591596,
"bank_type": "bca",
"date": "01/01/2018",
"amount": "104082",
"description": "bayar spanduk lagi",
"type": "CR",
@fahmiegerton
fahmiegerton / db.js
Last active February 22, 2021 13:07
const sqlite3 = require('sqlite3').verbose();
var db;
var dberror = false;
const path = require('path');
async function buatDb() {
console.log("Sedang membuat db");
db = await new sqlite3.Database(path.resolve(__dirname, '../bin/dbsesi.db'), (err) => {
if (err) {
dberror = true;
@fahmiegerton
fahmiegerton / modify.scss
Created February 26, 2021 08:13
Enable the valid/invalid bootstrap-vue border working with vee-validate 3
.form-control.v-select, .v-select * {
height: auto !important;
padding-right: 0px !important;
margin-right: 7px;
}
@fahmiegerton
fahmiegerton / Dockerfile
Created February 27, 2021 03:57
docker php-fpm alpine for codeigniter 4
# Image
FROM php:7.4.15-fpm-alpine3.12
# Set timezone
ENV TIMEZONE=Asia/Makassar
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && sync && install-php-extensions \
@fahmiegerton
fahmiegerton / default.conf
Created March 8, 2021 02:33
Nuxt and PHP app under one domain [Nuxt => example.test, PHP =>example.test/api]. But it's not working, help!!
server {
## How to allow access from LAN and Internet to your local project:
## https://winnmp.wtriple.com/howtos#How-to-allow-access-from-LAN-and-Internet-to-your-local-project
listen 127.0.0.1:80;
## Enable self signed SSL certificate:
## https://winnmp.wtriple.com/howtos#Enable-self-signed-SSL-certificate-for-your-local-project
listen 127.0.0.1:443 ssl http2;
@fahmiegerton
fahmiegerton / Request.php
Created March 30, 2021 18:28
CodeIgniter 4 to access request class for custom library. Maybe there's another nice way, but this is the only way I could think of.
<?php
namespace Library\CustomLibrary;
use CodeIgniter\HTTP\RequestInterface;
class Request
{
/**
* Instance of the main Request object.
*
@fahmiegerton
fahmiegerton / oracleflix.db
Created September 14, 2021 08:44
oracle final project
-- create tables --
-- create customer's table
CREATE TABLE customers(
customer_id NUMBER CONSTRAINT customer_id_pk PRIMARY KEY,
last_name VARCHAR2(25) NOT NULL,
first_name VARCHAR2(25) NOT NULL,
home_phone VARCHAR2(12) NOT NULL,
address VARCHAR2(100) NOT NULL,
city VARCHAR2(30) NOT NULL,
state VARCHAR2(2) NOT NULL,
<script type="text/x-template" id="app-template">
<v-app>
<v-container>
<v-autocomplete
id="city"
name="city"
required
label="Your City"
v-model="form.city"
hide-no-data
@fahmiegerton
fahmiegerton / MyController.php
Created October 4, 2021 16:30
Laravel Eloquent - Ignore mutators in some case situation (https://stackoverflow.com/a/43849449/4705820)
<?php
// ...
public function update(MyModel $m, $id) {
$m->$preventAttrSet = true; // this doesn't work, it will reset to false again
$data = $m->with('relation')->findOrFail($id)->ignoreMutators(); // this work and will ignore the mutators
return view('some.view', $data);
}