Skip to content

Instantly share code, notes, and snippets.

View ahmadshah's full-sized avatar
:octocat:
Yo!

Ahmad Shah Hafizan Hamidin ahmadshah

:octocat:
Yo!
View GitHub Profile
@ahmadshah
ahmadshah / cheatsheet.md
Last active August 29, 2015 14:02
Eisai Markdown Extra

###Learning objective box [open .objectives]-content-[close]

###Glossary text [open a .glossary]**glossary text**[close a]

###Flash forward pink box [open .objective.flash-forward]-content-[close]

###Did you know blue box

@ahmadshah
ahmadshah / Scheduler.php
Last active August 29, 2015 14:01
Date Recurring Scheduler By Month
<?php
use \Exception;
use Carbon\Carbon;
class Scheduler {
/**
* Scheduler starting date
*
@ahmadshah
ahmadshah / FooController.php
Created May 20, 2014 18:50
Load theme manually in controller action
<?php
use Orchestra\Support\Facades\Theme;
class FooController extends BaseController {
public function show($moduleSlug)
{
Theme::setTheme('module');
return View::make('eisai/module::show');
@ahmadshah
ahmadshah / User.php
Created May 18, 2014 20:12
Orchestra\HTML Table
<?php namespace Eisai\Foundation\Presenter;
use Orchestra\Support\Str;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\HTML;
use Orchestra\Support\Facades\Form;
use Orchestra\Support\Facades\Table;
use Orchestra\Html\Table\TableBuilder;
use Orchestra\Foundation\Presenter\AbstractablePresenter;
Event::listen('auth.login', function ($user) {
if ($user->name === 'Ahmad') {
$user->name = 'Ahmad Shah';
}
});
casper.test.begin('Test tax incentive login page', 2, function (test) {
casper.start('http://dev.taxincentive.flexworklife.my', function () {
test.assertTitle('Flexworklife - Tax Incentive', 'Page title is correct');
test.assertExists('form', 'Login form exists');
});
casper.run(function () {
test.done();
});
});
@ahmadshah
ahmadshah / UploadableTrait.php
Created May 11, 2014 19:37
UploadableTrait.php
<?php namespace Eisai\Support\Traits;
use Rhumsaa\Uuid\Uuid;
use Illuminate\Support\Facades\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
trait UploadableTrait {
/**
* [store description]
@ahmadshah
ahmadshah / NotifiableTrait.php
Created May 9, 2014 18:54
Orchestra notifier trait
<?php
use Ochestra\Model\User;
use Orchestra\Support\Facades\Notifier;
trait NotifiableTrait {
/**
* Send email notification to user
*
@ahmadshah
ahmadshah / tools.md
Last active August 29, 2015 13:56
Development Automation Tools

Development Automation Tools

Installing Node.js and NPM

Windows

If you are not sure whether you already have running try this

  • Open up your command prompt
  • type node --version and you will see the current node version
  • type npm --version and you will see the current npm version
@ahmadshah
ahmadshah / fuck.php
Created February 24, 2014 16:41
DIE!
<?php include_once("../_config.php");
$appcate = $_SESSION['jenis_pelanggan'];
$sql = DBquery("SELECT a.id_pelanggan,a.nama,b.id_pelanggan,alamat1,alamat2,poskod,bandar,id_negeri,no_tel,no_fax,
email
FROM li_pelanggan a,li_alamat b
WHERE a.id_pelanggan = '" . $_SESSION['id_pelanggan'] . "'
AND a.id_pelanggan = b.id_pelanggan
AND a.jenis_pelanggan = '".$appcate."'");