Skip to content

Instantly share code, notes, and snippets.

View ilhamsj's full-sized avatar
🎯
Focusing

Ilham Saputrajati ilhamsj

🎯
Focusing
View GitHub Profile
@ilhamsj
ilhamsj / 01-introduction.md
Created August 23, 2024 05:02 — forked from gemmadlou/01-introduction.md
WordPress Composer Starter (Steps)

Develop WordPress as a Modern PHP Project with Composer


WordPress is popular because it's easy to setup without much technical know-how. However, to build a more robust PHP project with command line deployments, updates and ongoing maintenance, working with WordPress out-of-the-box raises specific challenges:


  • How can we make our WordPress projects portable between developers?
@ilhamsj
ilhamsj / nginx.md
Last active September 16, 2022 15:27
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

From my end need to setup the root /var/www/WordPress/; and
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

$document_root required

server {
    listen 80;
 server_name localid.blog.com;
@ilhamsj
ilhamsj / firestore.js
Last active October 21, 2021 03:41
CRUD Firebase Firestore 9.1
const { getFirestore, collection, addDoc, getDocs, doc, getDoc, query, where, updateDoc,
deleteField, deleteDoc } = require('firebase/firestore')
initializeApp({
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: ""

SECTION 1

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

"""
x mod 3 = Fizz
x mod 5 = Buzz
x mod 15 = FizzBuzz
else print x
"""
@ilhamsj
ilhamsj / readme.md
Created August 6, 2021 12:38
adb server version (41) doesn't match this client (39); killing...

#UBUNTU

which adb

in my case adb locate in /usr/bin/adb remove it

go to your android platform-tools adb in my case the location at ~/Android/Sdk/platform-tools

@ilhamsj
ilhamsj / issue
Created June 9, 2021 13:47
laravel error could not be opened in append mode: failed to open stream: Permission denied on CentOs 8
Prove this is the problem by turning off selinux with the command
setenforce 0
This should allow writing, but you've turned off added security server-wide. That's bad. Turn SELinux back
setenforce 1
Then finally use SELinux to allow writing of the file by using this command
chcon -R -t httpd_sys_rw_content_t storage
And you're off!
@ilhamsj
ilhamsj / Javascript Format NPWP
Created November 22, 2020 03:47 — forked from yudapc/Javascript Format NPWP
Javascript Format NPWP. NPWP is ID tax each people of indonesian. Specificly in frontend need to format NPWP before render to user
//
// Javascript Format NPWP
//
function formatNpwp(value) {
if (typeof value === 'string') {
return value.replace(/(\d{2})(\d{3})(\d{3})(\d{1})(\d{3})(\d{3})/, '$1.$2.$3.$4-$5.$6');
}
}
@ilhamsj
ilhamsj / sf2Exceptions
Created October 23, 2020 22:05 — forked from feyyazesat/sf2Exceptions
Symfony 2 Exception List
Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php
Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php
Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php
Symfony/Component/Serializer/Exception/InvalidArgumentException.php
Symfony/Component/Serializer/Exception/UnsupportedException.php
Symfony/Component/Serializer/Exception/UnexpectedValueException.php
Symfony/Component/Serializer/Exception/LogicException.php
Symfony/Component/Serializer/Exception/Exception.php
Symfony/Component/Serializer/Exception/RuntimeException.php
Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase-database.js"></script>
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
<?php
require 'vendor/autoload.php';
use Dompdf\Dompdf;
$html = '
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">