Skip to content

Instantly share code, notes, and snippets.

View mdmunir's full-sized avatar

Misbahul D Munir mdmunir

View GitHub Profile
@mdmunir
mdmunir / Action.php
Created June 23, 2015 22:41
Menghitung waktu shalat
public function actionImsakiyah()
{
$model = new \app\models\Imsakiyah();
$jadwal = null;
if ($model->load(\Yii::$app->request->get(), '') && $model->validate()) {
$jadwal = $model->getImsakiyah();
}
return $this->render('imsakiyah', ['model' => $model, 'jadwal' => $jadwal]);
}
<?php
// API /api/customer-lt
$columns = [
[
'key' => 'registration_at',
'title' => 'Tanggal Didaftarkan',
'type' => 'date',
'width' => 22,
],
@mdmunir
mdmunir / AccessControl.php
Created March 4, 2022 11:27
Laravel access control
<?php
namespace App\Http\Middleware;
use App\Models\Auth;
use Closure;
use Illuminate\Http\Request;
use yii\db\Query;
use function abort;
use function auth;
@mdmunir
mdmunir / app_views_hello.php
Created March 3, 2022 13:40
Yii di slim fw
<?php
use yii\web\View;
//use yii\helpers\Html;
/* @var $this View */
$js = <<<JS
setInterval(function(){
@mdmunir
mdmunir / GiiModel.php
Created May 28, 2021 15:40
artisan gii generator model
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GiiModel extends Command
{
/**
* The name and signature of the console command.
@mdmunir
mdmunir / app.php
Created May 27, 2021 13:13
Menggunakan Yii di Laravel
<?php
// file bootstrap/app.php
require_once __DIR__ . '/yii.php';
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
@mdmunir
mdmunir / series.txt
Created April 3, 2021 07:38
ELP MPP02 Full
This file has been truncated, but you can view the full file.
MEAN LONGITUDE
3.8103440908308803 8399.68473007193 -0.00003318952042550094 3.1102494491060616e-8 -2.0328237648922845e-10
SERIES L 0
-411.5957481751525 3.255810486814223 16866.9323149832 -0.00012801233075296722 -1.0690432556673935e-8 -5.88563808866977e-11
0.420325481381435 6.511620973628446 33733.8646299664 -0.00025602466150593443 -2.138086511334787e-8 -1.177127617733954e-10
-0.0005899690456160886 9.767431460442669 50600.7969449496 -0.00038403699225890165 -3.2071297670021804e-8 -1.765691426600931e-10
0.00015999226140402215 -7.411876910055867 -42272.10552032615 0.0005363294000212278 2.827901718246765e-7 -1.0594148559605577e-9
-0.08018733260469108 -4.1560664232416435 -25405.17320534295 0.0004083170692682606 2.720997392680026e-7 -1.1182712368472555e-9
39.5333019706006 -0.9002559364274205 -8538.240890359752 0.0002803047385152934 2.6140930671132867e-7 -1.1771276177339532e-9
22639.585659999782 2.3555545503868025 8328.69142462345 0.00015229240776232618 2.507188741546547e-7 -1.2359839986206508e-9
[{"propinsi":"ACEH","nama":"Banda Aceh, ACEH","bujur":95.31716666666667,"lintang":5.5536666666666665,"zona":"+07","ibukota":true},{"propinsi":"ACEH","nama":"Sabang, ACEH","bujur":95.324,"lintang":5.893833333333333,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Calang, ACEH","bujur":95.58083333333333,"lintang":4.6345,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Jantho, ACEH","bujur":95.6015,"lintang":5.300833333333333,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Sigli, ACEH","bujur":95.95783333333333,"lintang":5.381,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Meulaboh, ACEH","bujur":96.12466666666667,"lintang":4.158833333333333,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Meureudu, ACEH","bujur":96.26133333333334,"lintang":5.233,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Suka Makmue, ACEH","bujur":96.3065,"lintang":4.176,"zona":"+07","ibukota":false},{"propinsi":"ACEH","nama":"Sinabang, ACEH","bujur":96.3805,"lintang":2.4795,"zona":"+07",
@mdmunir
mdmunir / kabupaten.js
Created January 19, 2021 14:39
data lokasi lon lat
module.exports = [{
propinsi: "ACEH",
nama: "Banda Aceh, ACEH",
bujur: 95.31716666666667,
lintang: 5.5536666666666665,
zona: "+07",
ibukota: true
}, {
propinsi: "ACEH",
nama: "Sabang, ACEH",
@mdmunir
mdmunir / AssetPublishBehavior.php
Last active January 6, 2021 01:46
Publish asset tanpa hash folder
<?php
namespace app\classes;
use Yii;
use yii\base\Behavior;
use yii\web\AssetManager;
/**
* Description of AssetPublishBehavior