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
@yus-ham
yus-ham / index.php
Last active December 10, 2015 06:02
<?php
//
// + List files & directories
// + Write & Run PHP snipet
// + https://gist.github.com/665addb757cfcff9be67.git
//
ini_set("display_errors", 1);
error_reporting(30711);
<script>
d=new Date()
tahun=d.getFullYear()
bulan=d.getMonth()
lokasi=682 // bogor
location="http://simbi.kemenag.go.id/sihat/site/get_sholat?tahun="+ tahun +"&bulan="+ (bulan+1) +"&lokasi="+ lokasi +"&h=0&type=html"
</script>
@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" %*
<?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';
}
<body style=width:900px><pre>
<?php
error_reporting(E_ALL);
createFileRecursive([
'dir' => __DIR__,
'name' => '.nomedia',
'contents' => '',
'excludes' => [
@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) {