Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
Working

Mior Muhammad Zaki crynobone

🖥️
Working
View GitHub Profile
View Deposit.php
<?php
class Deposit extends OperationBaseModel {
protected $guarded = array();
public static $rules = array(
'deposit_amount' => 'required',
'approval_status' => 'required'
);
}
@crynobone
crynobone / gist:7610646
Last active Dec 29, 2015
Append Menu to Orchestra Platform
View gist:7610646
<?php
$menu = Orchestra\App::menu();
$menu->add('foo', '>:home')
->link('path/foo')
->title('Foobar');
/*
Position
View ExampleTest.php
<?php
class ExampleTest extends TestCase {
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
View DatabaseSeeder.php
<?php
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
@crynobone
crynobone / Guardfile
Created Aug 31, 2013
Guardfile for Laravel 4 projects.
View Guardfile
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard :less, :all_on_start => true, :all_on_start => false, :output => "public/css" do
watch(%r[^app/assets/less/(.+\.less)$])
end
guard 'coffeescript', :input => 'app/assets/coffee'
# Refresh the browser on save
@crynobone
crynobone / .zshrc
Last active Dec 17, 2015
Oh My Zsh Configuration
View .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="crynobone"
# Set to this to use case-sensitive completion
@crynobone
crynobone / compile.php
Last active Dec 17, 2015
Compiled for Orchestra Platform 2.
View compile.php
<?php
$vendorDir = app('path.base').'/vendor';
return array_map('realpath', array(
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
View inception.php
<?php
function inception($iterator = 1, $range = 0, $limit = 15, $goDeeper = true) {
while ($iterator < $limit) {
echo ($range += $iterator)%10;
$goDeeper and inception($iterator, $range, ($limit - 1), false);
++$iterator;
}
print PHP_EOL;
};
@crynobone
crynobone / command.sh
Last active Dec 14, 2015
Creating custom installation schema during Installation for Orchestra Platform
View command.sh
php artisan orchestra::toolkit installer
@crynobone
crynobone / routes.php
Created Mar 8, 2013
Enabling Profiler only for Orchestra Platform Administrator Account
View routes.php
<?php
Route::filter('before', function ()
{
if (Orchestra::acl()->can('Manage Orchestra'))
{
Config::set('application.profiler', true);
Config::set('error.detail', true);
Profiler::attach();
}