Skip to content

Instantly share code, notes, and snippets.

View shellprog's full-sized avatar
🏠
Working from home

Md Imran shellprog

🏠
Working from home
View GitHub Profile
@shellprog
shellprog / Blade Extend
Created July 10, 2014 19:27
Blade Extend
Blade::extend(function ($view) {
$pattern = Blade::createOpenMatcher('cache');
$replace = "<?php echo PageCache::cache$2 { ?>";
$view = preg_replace($pattern, $replace, $view);
// Replace closing tag
$view = str_replace('@endcache', '<?php }); ?>', $view);
return $view;
@shellprog
shellprog / HTML or Laravel Countries Select
Created October 20, 2014 18:27
It just waste my time when i see small thing costing me so much . Use it and get rid of this large list
<select name="country" class="form-control">
<option {{Input::old('country',$profile->country)=="Afghanistan"?"selected":""}} value="Afghanistan">Afghanistan</option>
<option {{Input::old('country',$profile->country)=="Albania"?"selected":""}} value="Albania">Albania</option>
<option {{Input::old('country',$profile->country)=="Algeria"?"selected":""}} value="Algeria">Algeria</option>
<option {{Input::old('country',$profile->country)=="American Samoa"?"selected":""}} value="American Samoa">American Samoa</option>
<option {{Input::old('country',$profile->country)=="Andorra"?"selected":""}} value="Andorra">Andorra</option>
<option {{Input::old('country',$profile->country)=="Angola"?"selected":""}} value="Angola">Angola</option>
<option {{Input::old('country',$profile->country)=="Anguilla"?"selected":""}} value="Anguilla">Anguilla</option>
<option {{Input::old('countr
@shellprog
shellprog / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
@shellprog
shellprog / gist:0aeb63d38d84bae88d07
Last active September 14, 2015 13:40 — forked from nghuuphuoc/gist:8282411
Install wkhtmltopdf on Centos 6 x64
$ wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
$ tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
$ mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
// In case you got the issue
// wkhtmltopdf: error while loading shared libraries:
// libfontconfig.so.1: cannot open shared object file: No such file or directory
//
// run the command below:
$ yum install urw-fonts libXext libXrender fontconfig libfontconfig.so.1
<html>
<head>
<link rel="stylesheet" type="text/css" media="all" href="../../css/base.css" />
<script src="../../js/jquery.js"></script>
<script src="../../js/iframe.js"></script>
<script src="../../js/iframe/comment.js"></script>
<title>Clipper</title>
<style>
body{
background-color:#2c2e3e !important;
@shellprog
shellprog / Create Laravel Project
Created April 26, 2018 17:53
Create Laravel Project
composer create-project laravel/laravel todolist
@shellprog
shellprog / config.php
Last active April 26, 2018 18:26
Database Config
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'lucifier_todolist',
'username' => 'username',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
@shellprog
shellprog / Create Migration
Created April 26, 2018 17:55
Create Migration
php artisan migrate:make create_tasks_table --table=tasks --create
@shellprog
shellprog / CreateTasksTable.php
Last active April 26, 2018 18:28
CreateTasksTable
<?php
 
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
 
class CreateTasksTable extends Migration {
 
    public function up()
    {
        Schema::create('tasks', function(Blueprint $table)
@shellprog
shellprog / Migrate Command
Created April 26, 2018 17:58
Migrate Command
php artisan migrate