This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL dump 10.16 Distrib 10.1.30-MariaDB, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: mysql | |
-- ------------------------------------------------------ | |
-- Server version 10.1.30-MariaDB-0ubuntu0.17.10.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8mb4 */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing laravel | |
describing route model view controller | |
showing folder structure with factory and migration | |
artisan command | |
php artisan make:model make:controller make:factory make:migration | |
git include | |
php artisan make:model Post -a (but I won't do that, do later) | |
crud | |
-------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl + shift + p | |
# file and folder manipulation | |
==================== | |
sidebar enhancement | |
advanced new file | |
# completion | |
=========== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.desktop.interface text-scaling-factor 1.75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function str_pad(n) { | |
return String("00" + n).slice(-2); | |
} | |
var dateObj = new Date(); | |
var month = str_pad( dateObj.getUTCMonth() + 1); | |
var day = str_pad(dateObj.getUTCDate() + 1); | |
var year = dateObj.getUTCFullYear(); | |
newdate = year + "-" + month + "-" + day; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if ($request->has('avatar')) { | |
$avatar = $request->file('avatar'); | |
$filename = time() . '.' . $avatar->getClientOriginalExtension() ; | |
$relative_file_path = '/images/uploads/' . $filename; | |
$absolute_file_path = public_path($relative_file_path); | |
Image::make($avatar)->resize(350, 350)->save($absolute_file_path); | |
$contact = Contact::find($request->input('contact_id')); | |
$old_image_abs_path = public_path($contact->image); | |
if (file_exists($old_image_abs_path) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if ($paginator->hasPages()) | |
<ul class="pagination"> | |
{{-- Previous Page Link --}} | |
@if ($paginator->onFirstPage()) | |
<li class="disabled"><i class="material-icons">chevron_left</i></li> | |
@else | |
<li class="waves-effect"><a href="{{ $paginator->previousPageUrl() }}"><i class="material-icons">chevron_left</i></a></li> | |
@endif | |
{{-- Pagination Elements --}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +FollowSymLinks -MultiViews | |
RewriteEngine On | |
# Redirect requests to index.php | |
RewriteCond %{REQUEST_URI} !=/index.php | |
RewriteCond %{REQUEST_URI} !.*\.png$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.css$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC] | |
RewriteCond %{REQUEST_URI} !.*\.js$ [NC] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias cls="echo -e '\\0033\\0143'" | |
I can use reset. which also working fine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] | |
RewriteRule ^.*$ index.php [NC,L] |
NewerOlder