Skip to content

Instantly share code, notes, and snippets.

View a9un9hari's full-sized avatar

Agung Hari Wijaya a9un9hari

View GitHub Profile
@a9un9hari
a9un9hari / downgrade.sh
Created March 13, 2020 02:16 — forked from jcowley/downgrade.sh
Downgrade Apache + PHP on Ubuntu 14.04
cat <<EOF >> /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu precise main restricted universe
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
EOF
apt-get update
apt-get purge \
apache2 \
@a9un9hari
a9un9hari / README.md
Last active August 31, 2015 04:04 — forked from mul14/README.md
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model {

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

<?php namespace Smile\Services\Creators;
use Illuminate\Validation\Factory as Validator;
abstract class Creator implements CreatorInterface
{
protected $model;
protected $errors;

Direktori L3. Saya berasumsi anda telah menginstall composer. Bisa dalam bentuk bin atau hasil download dari http://getcomposer.org/composer.phar.

Saya kasih contoh dengan menggunakan composer.phar dan letakkan file tersebut seperti ini.

/application  
/bundles	
/laravel	
/public	
/storage	
<?php
// Resizer and Image Manipulation
// Based on: http://forums.laravel.com/viewtopic.php?id=2648
public function post_edit_logo($id)
{
$rules = array(
'image' => 'image',
);
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {