Skip to content

Instantly share code, notes, and snippets.

View yus-ham's full-sized avatar
🌴
On vacation

Yusup Hambali yus-ham

🌴
On vacation
View GitHub Profile

kemungkinan error karena shutdown computer yang dipaksa

untuk fixing

  • backup (move/rename) file ibdata1 yang ada di folder (MYSQL install)/data
  • hapus semua file (bukan folder) yang ada di folder (MYSQL install)/data
  • logout and login computer
  • sudo service mysql start
  • sudo service mysql stop
  • akan ada file ibdata1 yang baru setelah servis mysql di-start, timpa file tsb dengan ibdata1 backup
  • sudo service mysql start lagi
<?php
class xxx {
// To convert path string into multi-dimensional array compatible for jstree jquery plugin
public function getAllPermissions() {
$perms = [
'usupha/repos',
'usupha/repos/new',
'usupha/projects',
'usupha/stars',
@yus-ham
yus-ham / Directory.php
Last active August 5, 2019 04:33
File Manager
<?php
namespace fm;
class Directory extends File
{
public function open() {
echo "<h2>Index of: ". $this->path ."</h2>\n";
$files = new \DirectoryIterator($this->path);
foreach ($files as $file) {
<body style=width:900px><pre>
<?php
error_reporting(E_ALL);
createFileRecursive([
'dir' => __DIR__,
'name' => '.nomedia',
'contents' => '',
'excludes' => [
<?php //ext/tree/Node.php
namespace app\ext\tree;
use Yii;
class Node extends \kartik\tree\models\Tree
{
public static function tableName() {
return 'tbl_tree';
}
@yus-ham
yus-ham / composer.cmd
Last active June 5, 2016 15:47 — forked from JCook21/composer.bat
Quick Batch file to add a 'composer' command to windows.
@echo off
if "%PHPBIN%" == "" set PHPBIN=C:\path\to\php.exe
"%PHPBIN%" "C:\path\to\composer.phar" %*