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' => [
<?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',
pkexec chmod 777 /var/run/postgresql
/usr/lib/postgresql/10/bin/pg_ctl start -D /var/lib/postgresql/10/main
xfce4-terminal -e "/usr/lib/postgresql/10/bin/pg_ctl status -D /var/lib/postgresql/10/main" --hold