Skip to content

Instantly share code, notes, and snippets.

View aldhinya's full-sized avatar
😂
I may be slow to respond.

Fadhilatur Rochman aldhinya

😂
I may be slow to respond.
View GitHub Profile
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package koneksi;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
@aldhinya
aldhinya / base_url
Last active November 22, 2019 02:09
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://" . $_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']);
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Api JS</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
$.getJSON("https://beritaku.rochman.id/api/categories", function(result){
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
try {
$ch = curl_init ("https://covid19dev.jatimprov.go.id/xweb/draxi");;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($ch);
preg_match('#<table[^>]*>(.+?)</table>#is', $page, $matches);
foreach ($matches as &$match) {
$match = $match;
}
echo '<div class="table-responsive">
@aldhinya
aldhinya / .htaccess
Last active June 12, 2020 13:48
Laravel HTACCESS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

1. Install CMD:

composer require h4cc/wkhtmltopdf-amd64 0.12.x
composer require h4cc/wkhtmltoimage-amd64 0.12.x
composer require wemersonjanuario/wkhtmltopdf-windows "0.12.2.3"
composer require barryvdh/laravel-snappy

2. Edit file config/app.php

Tambah di providers:

x-tags.net|a01.uadexchange.com|cdn.uzone.id|cdn3.uzone.id|cfs.uzone.id|csf.uzone.id|d01.notifa.info|d31qbv1cthcecs.cloudfront.net|d5nxst8fruw4z.cloudfront.net|expose.uzone.id|kendedes.uzone.id|mercusuar.uzone.id|p01.notifa.info|p02.notifa.info|p04.notifa.info|p03.notifa.info|p05.notifa.info|usearch.co.id|welcome.indihome.co.id|upoint.id|uzone.id
package com.example.tugasandroid1;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.Button;