Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Peteng Dedet (Ikhwan Maftuh) PetengDedet

🏠
Working from home
  • Indonesia
View GitHub Profile
View Multilevel Menu Codeigniter
//----MY Table--
MariaDB [sik]> select * from sik_institution;
+----+-------------------------------+-----------+--------+
| id | name | alias | parent |
+----+-------------------------------+-----------+--------+
| 1 | Kantor Bendahara Pesantren | bendahara | NULL |
| 2 | Bidang Pendidikan Tinggi | dikti | 1 |
| 3 | Institut Agama Islam Ibrahimy | iaii | 2 |
| 4 | Fakultas Syari'ah | fs | 3 |
+----+-------------------------------+-----------+--------+
View gist:51b75aa844b3e28149e5d21c289804e3
This file has been truncated, but you can view the full file.
.
├── 1.env
├── LICENSE.md
├── README.md
├── _ide_helper.php
├── anu.md
├── app
│   ├── ApiToken.php
│   ├── Console
View snip
public function surveyPlayStore($id, Request $request)
{
$userdata = Cektoken::cek($request->token);
$data = [];
$survey = \App\Models\Survey::find($id);
if (!$survey OR $survey->is_active == 'n') {
return response()->json(['status' => false, 'data' => $data, 'message' => 'Survey tidak valid'], 404);
}
View checkquestion
public function quizCheckAnswer($quiz_id, Request $request) {
$userdata = Cektoken::cek($request->token);
$data = [];
//Cek Quiz
$quiz = \App\Models\Quiz::find($quiz_id);
//Quiz tidak ditemukan
if (! $quiz) {
return response()->json(['status' => false, 'data' => $data, 'message' => 'Ups, Quiz tidak valid',404]);
}
View gist:738f8b0b970eb974c7c7c41ce84cc355
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Auth;
View api
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Auth;
View [ASK] ELK Security.md
+--------------------------------------------------------------------------+
|                                                                          |
|                           Phisical Server                                |
|                           Host: 192.168.100.1                            |
|                                                                          |
|                                                                          |
|                                                                          |
|                                                                          |
|                                                                          |
@PetengDedet
PetengDedet / ping_say.sh
Last active Sep 19, 2020
Script to tell you that ping is reply or not on macos
View ping_say.sh
#!/bin/bash
CONNECT_STATE=0
PREVIOUS_STATE=0
while true; do
if ping -c 1 google.com | grep "64 bytes from"; then
CONNECT_STATE=1
else
CONNECT_STATE=0
You can’t perform that action at this time.